summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-04 14:06:04 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-04 14:06:04 +0200
commitac975b903ac17efee689bc28f363ff4141dbad90 (patch)
tree8852ebcd0bc309b9afd71b72efad4e6650c73a52 /core/src/ch
parent70199c93d255357bb8af8fb60d501d9ae1ca8860 (diff)
downloadRustAndDust-ac975b903ac17efee689bc28f363ff4141dbad90.zip
RustAndDust-ac975b903ac17efee689bc28f363ff4141dbad90.tar.gz
StateSelect: clear() on reinforcement dock togggle
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java4
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateSelect.java3
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;