From 48eded8cfa88420fd21dd3effc5aafca5d6370b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 19 Jan 2015 17:22:43 +0100 Subject: StateMove: can exit from exit zone hex --- core/src/ch/asynk/tankontank/game/states/StateMove.java | 4 ++-- 1 file 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; } -- cgit v1.1-2-g2b99