From ab3e10a812ffdc89fc288bc965fa9d40459d2de8 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Wed, 13 Dec 2017 20:35:29 +0100 Subject: Allow selecting dead humans. --- src/game/game.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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_) -- cgit