From fa44190dc333d09b87970409b3ae3fa68919cd91 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 19 Dec 2017 13:48:14 +0100 Subject: Use move cflags when moving. --- src/game/units.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/game/units.cpp') diff --git a/src/game/units.cpp b/src/game/units.cpp index da6b1a3..279bf0b 100644 --- a/src/game/units.cpp +++ b/src/game/units.cpp @@ -103,7 +103,7 @@ bool unit_t::keep_moving(double speed) while (time > 0.0f) { v2f_t delta, next, x_new; - world::cmodel_t cmodel_next; + world::cmodel_t test_cmodel; if (!move.path.size()) { move.moving = false; @@ -125,11 +125,11 @@ bool unit_t::keep_moving(double speed) move.path.pop_front(); } - cmodel_next.bounds = size + x_new; - cmodel_next.cflags = cmodel.cflags; - if (!world->test_rect(&cmodel_next, this)) { + test_cmodel.bounds = size + x_new; + test_cmodel.cflags = move.cflags; + if (!world->test_rect(&test_cmodel, this)) { x = x_new; - cmodel = cmodel_next; + cmodel.bounds = test_cmodel.bounds; move.blocked = false; continue; } -- cgit