summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-28 18:33:59 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-28 18:33:59 +0100
commit79b4811452f6a53509e6ffe5b1f6e4f266c4a8f8 (patch)
tree89d0e314789bd5a7947caacf6c34f33378a109b3 /core/src/ch/asynk/tankontank
parentc7244e3cb3b74c2b31c5680aca1a3e8292e2bf4c (diff)
downloadRustAndDust-79b4811452f6a53509e6ffe5b1f6e4f266c4a8f8.zip
RustAndDust-79b4811452f6a53509e6ffe5b1f6e4f266c4a8f8.tar.gz
StateRotate: self select -> ABORT
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateRotate.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
index aa427ab..8b53221 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
@@ -82,6 +82,11 @@ public class StateRotate extends StateCommon
@Override
public void touchUp()
{
+ if (upHex == activeUnit.getHex()) {
+ ctrl.setState(StateType.ABORT);
+ return;
+ }
+
if (rotationSet) return;
o = Orientation.fromAdj(to, upHex);