summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/units.cpp10
1 files changed, 5 insertions, 5 deletions
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;
}