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.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/effects.cpp b/src/game/effects.cpp
index d9215e3..8e7d2d7 100644
--- a/src/game/effects.cpp
+++ b/src/game/effects.cpp
@@ -2,9 +2,15 @@
namespace game {
-effect_t::effect_t(state_t *game_) : world::entity_t(ET_EFFECT)
+effect_t::effect_t(state_t *game_) : game::entity_t(game_, ET_EFFECT)
{
- game = game_;
+ always_awake = true;
+}
+
+void effect_t::on_think(void)
+{
+ if (game->now >= ttl)
+ destroy();
}
fx_tracer_t::fx_tracer_t(state_t *game_, v2f_t x0_, v2f_t x1_) : effect_t(game_)