diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-12 23:17:02 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-12 23:17:02 +0200 |
commit | 545b0a1e0870aaf5032d8b2b96dcfc13ae97126f (patch) | |
tree | 11ab528d70030e3b89a6b84b09de7ff202c83b28 /src/game/game.cpp | |
parent | f274f281da32c829e20c5012d67431d6a4348cce (diff) |
Misc. gameplay improvements.
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r-- | src/game/game.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
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_soldier_t*>(unit), - snap, number); + x, number); break; case unit_t::UNIT_REPL: command_repl(dynamic_cast<unit_repl_t*>(unit), - snap, number); + x, number); break; default:; |