diff options
Diffstat (limited to 'src/game/unit_spider.cpp')
-rw-r--r-- | src/game/unit_spider.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/unit_spider.cpp b/src/game/unit_spider.cpp index fd69305..9ff8fc1 100644 --- a/src/game/unit_spider.cpp +++ b/src/game/unit_spider.cpp @@ -44,8 +44,12 @@ void unit_spider_t::target_and_attack(void) return; target = find_target(world, x, 10.0f, true); - if (!target) + if (!target) { + if (health < max_health) + random_walk(); + return; + } start_moving(target->x); next_targetting = game->now + game->prng.next_float(0.2f, 0.4f); |