summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-01-19 17:22:43 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-01-19 17:22:43 +0100
commit48eded8cfa88420fd21dd3effc5aafca5d6370b8 (patch)
tree6c37e8cf5be46d0a820bd0900db256d1d8493ce1 /core/src/ch/asynk/tankontank
parentc09ff7038f642df06f3597cf72fe3739bfcce3f5 (diff)
downloadRustAndDust-48eded8cfa88420fd21dd3effc5aafca5d6370b8.zip
RustAndDust-48eded8cfa88420fd21dd3effc5aafca5d6370b8.tar.gz
StateMove: can exit from exit zone hex
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateMove.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java
index b388862..fb5be50 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java
@@ -184,8 +184,8 @@ public class StateMove extends StateCommon
Zone exitZone = ctrl.battle.getExitZone(unit);
if ((exitZone == null) || !exitZone.contains(hex))
return false;
- if (!map.possiblePaths.canExit(exitZone.orientation))
- return false;
+ if ((unit.getHex() != hex) && !map.possiblePaths.canExit(exitZone.orientation))
+ return false;
ctrl.setState(StateType.ESCAPE);
return true;
}