summaryrefslogtreecommitdiff
path: root/src/game/effects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/effects.cpp')
-rw-r--r--src/game/effects.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/game/effects.cpp b/src/game/effects.cpp
index 932b562..39a1f1e 100644
--- a/src/game/effects.cpp
+++ b/src/game/effects.cpp
@@ -21,8 +21,6 @@ namespace game {
effect_t::effect_t(state_t *game_) : game::entity_t(game_, ET_EFFECT)
{
- ignore_waking = true;
- wake();
}
void effect_t::on_think(void)
@@ -43,6 +41,9 @@ fx_tracer_t::fx_tracer_t(state_t *game_, v2f_t x0_, v2f_t x1_) : effect_t(game_)
render_bounds = render_bounds.norm();
cmodel.bounds = render_bounds;
cmodel.cflags = 0;
+
+ ignore_waking = true;
+ wake();
}
void fx_tracer_t::render_to(render::state_t *render)
@@ -71,6 +72,9 @@ fx_blood_t::fx_blood_t(state_t *game_, v2f_t x_, bool alien_) : effect_t(game_)
render_bounds[1] = x + v2f_t(0.2, 0.2);
cmodel.bounds = render_bounds;
cmodel.cflags = 0;
+
+ ignore_waking = true;
+ wake();
}
void fx_blood_t::render_to(render::state_t *render)
@@ -88,4 +92,27 @@ void fx_blood_t::render_to(render::state_t *render)
render->render(phase, &assets::fx.blood, render_bounds, color);
}
+fx_move_marker_t::fx_move_marker_t(state_t *game_, v2f_t x_) : effect_t(game_)
+{
+ x = x_;
+ render_bounds[0] = x + v2f_t(-0.15, -0.4);
+ render_bounds[1] = x + v2f_t(0.15, 0.2);
+ cmodel.bounds = render_bounds;
+ cmodel.cflags = 0;
+
+ ignore_waking = true;
+ link(&game->world);
+}
+
+fx_move_marker_t::~fx_move_marker_t(void)
+{
+ unlink();
+ sleep();
+}
+
+void fx_move_marker_t::render_to(render::state_t *render)
+{
+ render->render(game->now * 2, &assets::move_marker, render_bounds, sf::Color::White);
+}
+
} // namespace game