diff options
Diffstat (limited to 'src/game/unit_spider.cpp')
-rw-r--r-- | src/game/unit_spider.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/unit_spider.cpp b/src/game/unit_spider.cpp index c6f5755..6bd7509 100644 --- a/src/game/unit_spider.cpp +++ b/src/game/unit_spider.cpp @@ -60,7 +60,7 @@ void unit_spider_t::target_and_attack(void) start_moving(target->x); next_targetting = game->now + game->prng.next_float(0.2f, 0.4f); - if (last_attack + 0.5 > game->now) + if (next_attack && game->time < next_attack) return; if ((x - target->x).len() >= 1.0f) @@ -70,9 +70,9 @@ void unit_spider_t::target_and_attack(void) if (trace.hit) return; - last_attack = game->now; target->damage(15, this); assets::spider.bite.play_3d(x); + next_attack = game->time + MSEC(500); } void unit_spider_t::on_wake(void) |