diff options
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/states/StateSelect.java | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 02d79e5..db28b80 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -535,8 +535,10 @@ public abstract class Ctrl implements Disposable private void unitDockToggle() { - if (this.stateType == StateType.SELECT) + if (this.stateType == StateType.SELECT) { + sendMsg(MsgType.CANCEL); post(StateType.REINFORCEMENT); + } else if (this.stateType == StateType.REINFORCEMENT) { sendMsg(MsgType.OK); post(StateType.SELECT); diff --git a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java index f6c42c3..8118e89 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java @@ -28,6 +28,9 @@ public class StateSelect extends StateCommon case PROMOTE: changeTo(StateType.PROMOTE); return true; + case CANCEL: + clear(); + return true; } return false; |