summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateDeployment.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java
index c3a333e..6129631 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java
@@ -44,7 +44,8 @@ public class StateDeployment extends StateCommon
@Override
public StateType abort()
{
- undo();
+ if (activeUnit != null)
+ undo();
return StateType.DEPLOYMENT;
}
@@ -73,8 +74,10 @@ public class StateDeployment extends StateCommon
unitEnter(activeUnit);
} else {
unit = downHex.getUnit();
- if (deployedUnits.contains(unit))
+ if (deployedUnits.contains(unit)) {
showRotation(unit, downHex);
+ activeUnit = unit;
+ }
}
}