diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/game.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp index 547d890..cf8fa1a 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -172,7 +172,7 @@ enum { bool state_t::populate_pie_menu(std::vector<interface::pie_item_t> &items) { - bool soldiers = false, repls = false; + bool soldiers = false, repls = false, rockets = false; items.clear(); @@ -186,6 +186,8 @@ bool state_t::populate_pie_menu(std::vector<interface::pie_item_t> &items) switch (unit->type) { case unit_t::UNIT_SOLDIER: soldiers = true; + if (!dynamic_cast<unit_soldier_t*>(unit)->rocket_fired) + rockets = true; break; case unit_t::UNIT_REPL: repls = true; @@ -198,7 +200,8 @@ bool state_t::populate_pie_menu(std::vector<interface::pie_item_t> &items) if (soldiers) { items.push_back((interface::pie_item_t){"Move", COMMAND_MOVE}); items.push_back((interface::pie_item_t){"Fire", COMMAND_FIRE}); - items.push_back((interface::pie_item_t){"Fire a rocket", COMMAND_FIRE_ROCKET}); + if (rockets) + items.push_back((interface::pie_item_t){"Fire a rocket", COMMAND_FIRE_ROCKET}); items.push_back((interface::pie_item_t){"Stop", COMMAND_STOP}); } |