summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-01-21 22:16:17 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-01-21 22:16:17 +0100
commit9e4385e8874dc8807eb40913c07f45e6fdfcf8d2 (patch)
treeabae44bb3afcf63b93d651bba86314347a02a781 /core/src/ch/asynk
parentb9f8cf9e93acd762f2c9f743c599f300e3f7d4ca (diff)
downloadRustAndDust-9e4385e8874dc8807eb40913c07f45e6fdfcf8d2.zip
RustAndDust-9e4385e8874dc8807eb40913c07f45e6fdfcf8d2.tar.gz
StateMove: when unit just entered, do not propose to exit already
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateMove.java2
1 files changed, 2 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 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;