summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateRotate.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
index f15b360..f67982e 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
@@ -82,16 +82,14 @@ 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);
+ if (o == Orientation.KEEP) {
+ ctrl.setState(StateType.ABORT);
+ return;
+ }
- if (o == Orientation.KEEP) return;
if (!activeUnit.movement.entryMove && rotateOnly && (o == activeUnit.getOrientation())) return;
rotationSet = true;