summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateRotate.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
index 2be7ee3..0a24b35 100644
--- a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
@@ -51,8 +51,12 @@ public class GameStateRotate extends GameStateCommon
if (o != Orientation.KEEP) {
clear();
- map.rotatePawn(pawn, o);
- ctrl.setState(State.ANIMATION);
+ if (pawn.getOrientation() != o) {
+ map.rotatePawn(pawn, o);
+ ctrl.setState(State.ANIMATION);
+ } else {
+ ctrl.animationDone();
+ }
}
}