diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-23 21:35:41 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-23 21:35:41 +0100 |
commit | 304923ce266bcfc6c52028b1b9f7342e7d4379a7 (patch) | |
tree | de3b6b6f25ad5001a6f00ce173c2957a1df35cef /core/src/ch/asynk/rustanddust | |
parent | a1f8f91ba93e2ca9655373130ae8bd841ca0275e (diff) | |
download | RustAndDust-304923ce266bcfc6c52028b1b9f7342e7d4379a7.zip RustAndDust-304923ce266bcfc6c52028b1b9f7342e7d4379a7.tar.gz |
StateRotate: fix bug when in HQ activation, start rotate, but do not complete it
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/states/StateRotate.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateRotate.java b/core/src/ch/asynk/rustanddust/game/states/StateRotate.java index b3159f5..2e9b520 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateRotate.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateRotate.java @@ -22,7 +22,7 @@ public class StateRotate extends StateCommon map.pathsBuild(to); } - if (map.pathsSize() != 1) + if (map.pathsSize() > 1) RustAndDust.debug("ERROR: pathsSize() == " + map.pathsSize()); rotateOnly = (to == activeUnit.getHex()); @@ -64,6 +64,9 @@ public class StateRotate extends StateCommon @Override public StateType execute() { + if (!rotationSet) + return StateType.DONE; + StateType whenDone = StateType.DONE; if (map.moveUnit(activeUnit) > 0) |