From 1de83ba7bc556a1af61c1030cd3c649e37b5db25 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 19 Dec 2017 13:31:40 +0100 Subject: Fix soldiers sometimes sliding when moving in a group. --- src/game/units.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/units.cpp b/src/game/units.cpp index a6edc48..691a099 100644 --- a/src/game/units.cpp +++ b/src/game/units.cpp @@ -99,6 +99,7 @@ bool unit_t::keep_moving(double speed) return true; time = game->dt * speed; + move.blocked = true; while (time > 0.0f) { v2f_t delta, next, x_new; @@ -129,11 +130,11 @@ bool unit_t::keep_moving(double speed) if (!world->test_rect(&cmodel_next, this)) { x = x_new; cmodel = cmodel_next; + move.blocked = false; continue; } if (move.attempts_left) { - move.blocked = true; move.attempts_left--; move.next_attempt = game->now + 0.2f; } else { -- cgit