summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateMove.java4
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateRotate.java5
2 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java
index f96678a..657c9bd 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java
@@ -83,6 +83,10 @@ public class StateMove extends StateCommon
hideAssists();
ctrl.setAnimationCount(map.activatedPawns.size());
map.revertMoves();
+ if (activeUnit.move.entryMove) {
+ map.leaveBoard(activeUnit);
+ ctrl.player.revertUnitEntry(activeUnit);
+ }
super.abort();
}
diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
index 2b63535..2a90eeb 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
@@ -71,6 +71,11 @@ public class StateRotate extends StateCommon
public void abort()
{
ctrl.hud.hide();
+ if (activeUnit.move.entryMove) {
+ map.leaveBoard(activeUnit);
+ ctrl.player.revertUnitEntry(activeUnit);
+ super.abort();
+ }
if (map.activatedPawns.size() == 0) {
hideAssists();
super.abort();