From 545b0a1e0870aaf5032d8b2b96dcfc13ae97126f Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 12 Apr 2018 23:17:02 +0200 Subject: Misc. gameplay improvements. --- src/game/game.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/game/game.cpp') diff --git a/src/game/game.cpp b/src/game/game.cpp index 4cac4eb..66bf237 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -247,14 +247,9 @@ static void command_repl(unit_repl_t *repl, v2f_t x, int number) void state_t::command(v2f_t x, int number) { - v2f_t snap; - if (!selected_units.size()) return; - 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) { if (unit->dead || !unit->controllable) continue; @@ -262,12 +257,12 @@ void state_t::command(v2f_t x, int number) switch (unit->type) { case unit_t::UNIT_SOLDIER: command_soldier(dynamic_cast(unit), - snap, number); + x, number); break; case unit_t::UNIT_REPL: command_repl(dynamic_cast(unit), - snap, number); + x, number); break; default:; -- cgit