diff options
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r-- | src/game/game.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp index 04034f7..5643b3a 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -54,9 +54,6 @@ void state_t::select(rectf_t x) if (unit->type != unit_t::UNIT_HUMAN) continue; - if (unit->dead) - continue; - unit->selected = selection_cookie; selected_units.insert(unit); } @@ -69,8 +66,12 @@ void state_t::command(v2f_t x) snap[0] = std::round(x[0] - 0.5f) + 0.5f; snap[1] = std::round(x[1] - 0.5f) + 0.5f; - for (unit_t *unit : selected_units) + for (unit_t *unit : selected_units) { + if (unit->dead) + continue; + unit->start_moving(snap, now); + } } void state_t::tick(double now_, double dt_) |