diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-19 13:48:14 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-19 13:48:14 +0100 |
commit | fa44190dc333d09b87970409b3ae3fa68919cd91 (patch) | |
tree | 8c2e1ba55b919aeb3e5d3cf01d4e8179ccfaecb2 /src/game | |
parent | def701e42a40a1d95c3195be0c07d9b7b71cdd1d (diff) |
Use move cflags when moving.
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/units.cpp | 10 |
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; } |