diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-19 14:04:28 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-19 14:04:36 +0100 |
commit | fec522f3c77696ea1d7907a1a2484910f8e391ca (patch) | |
tree | 68b64977452531bc804bac7be3b4d45569f9109c /src/game | |
parent | e29c796801dd6b7a406ef457c0c68b4a1c7f527a (diff) |
Fix panicking units stopping for no reason.
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/units.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/units.cpp b/src/game/units.cpp index e310026..021f4ac 100644 --- a/src/game/units.cpp +++ b/src/game/units.cpp @@ -42,7 +42,7 @@ void unit_t::render_to(render::state_t *render) } if (move.moving && debug_draw_paths) - render->debug_path(&move.path); + render->debug_path(x, &move.path); if (!dead && say_time + 5.0 > game->now) { v2f_t text_pos; @@ -417,6 +417,7 @@ void unit_soldier_t::on_think(void) if (!keep_moving(4.0)) say(text::get(text::SAY_BLOCKED)); } else { + move.moving = true; keep_moving(6.0); if (game->now >= panic_turn) { @@ -427,6 +428,7 @@ void unit_soldier_t::on_think(void) move.path.clear(); move.path.push_back(x + t * 10); panic_turn = game->now + 0.3; + std::cout << "panic_turn to " << x + t * 10 << "\n"; } } } |