From 9e4385e8874dc8807eb40913c07f45e6fdfcf8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 21 Jan 2015 22:16:17 +0100 Subject: StateMove: when unit just entered, do not propose to exit already --- core/src/ch/asynk/tankontank/game/states/StateMove.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java index 4794d35..27bc6af 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java @@ -181,6 +181,8 @@ public class StateMove extends StateCommon private boolean checkExit(Unit unit, Hex hex) { + if ((hex == unit.getHex()) && (unit.justEntered())) + return false; Zone exitZone = ctrl.battle.getExitZone(unit); if ((exitZone == null) || !exitZone.contains(hex)) return false; -- cgit v1.1-2-g2b99