diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-03-26 19:30:30 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-03-26 19:30:30 +0200 |
commit | 1c1c32fc463110d515cd43d6f149053f26a2672f (patch) | |
tree | deb18bb989476d7d4de1eeaf4cde0c496f3cc173 | |
parent | 2f978ea5085678e98e391317cc50ac991cd726a8 (diff) |
Make spiders pathfind much less often.
-rw-r--r-- | src/game/units.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/units.cpp b/src/game/units.cpp index edb41ec..2681a43 100644 --- a/src/game/units.cpp +++ b/src/game/units.cpp @@ -560,7 +560,8 @@ void unit_spider_t::target_and_attack(void) return; start_moving(target->x); - next_targetting = game->now + 0.2; + next_targetting = game->now + remap(game->dice_prng.next_float(), + 0.0f, 1.0f, 0.8f, 1.2f); if (last_attack + 0.5 > game->now) return; @@ -588,7 +589,6 @@ void unit_spider_t::on_think(void) void unit_spider_t::on_wake(void) { - next_targetting = game->now; } void unit_spider_t::on_death(void) |