From d376eb30b8363f712e3a0bbc04ea584547c09e65 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 14 Dec 2017 14:45:24 +0100 Subject: Command feedback. --- src/game/game.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/game/game.cpp') diff --git a/src/game/game.cpp b/src/game/game.cpp index f5f57bf..836b304 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -40,6 +40,8 @@ void state_t::stop(void) void state_t::select(rectf_t x) { + size_t old_cookie = selection_cookie; + selection_cookie++; selected_units.clear(); @@ -54,6 +56,9 @@ void state_t::select(rectf_t x) if (unit->type != unit_t::UNIT_HUMAN) continue; + if (unit->selected != old_cookie) + unit->say(text::get(text::SAY_READY)); + unit->selected = selection_cookie; selected_units.insert(unit); } @@ -72,6 +77,8 @@ void state_t::command(v2f_t x) if (!unit->start_moving(snap)) unit->say(text::get(text::SAY_NO_PATH)); + else + unit->say(text::get(text::SAY_MOVING)); } } -- cgit