summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateEngage.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateEngage.java b/core/src/ch/asynk/tankontank/game/states/StateEngage.java
index 14465cc..fb83080 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateEngage.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateEngage.java
@@ -93,8 +93,10 @@ public class StateEngage extends StateCommon
map.showAttackAssists();
ctrl.hud.actionButtons.show(Buttons.ENGAGE.b | Buttons.DONE.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0));
}
-
- if ((activeUnit != null) && map.engagementAssists.contains(unit)) {
+ else if (unit == activeUnit) {
+ ctrl.setState(StateType.DONE);
+ }
+ else if ((activeUnit != null) && map.engagementAssists.contains(unit)) {
if(map.toggleAttackAssist(unit))
ctrl.hud.notify(unit + " will fire");
else