From fec522f3c77696ea1d7907a1a2484910f8e391ca Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 19 Dec 2017 14:04:28 +0100 Subject: Fix panicking units stopping for no reason. --- src/game/units.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/game') 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"; } } } -- cgit