summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-28 21:30:44 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-28 21:30:44 +0100
commit0e88585c271f77bda99b6f8eadb078cc4f58e233 (patch)
tree05d10ac9286981e3b3f89dc17e30071ab8b5d38f /core/src/ch
parent5c1be4afb822d80ed6dbd33f5c2772aa9f426ea4 (diff)
downloadRustAndDust-0e88585c271f77bda99b6f8eadb078cc4f58e233.zip
RustAndDust-0e88585c271f77bda99b6f8eadb078cc4f58e233.tar.gz
StateMove: changeUnit() do not set MOVE overlay if has moved
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateMove.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java
index 32050a2..be09ed6 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java
@@ -133,7 +133,8 @@ public class StateMove extends StateCommon
{
if (activeUnit != null ) {
map.unselectHex(activeUnit.getHex());
- activeUnit.enableOverlay(Unit.MOVE, true);
+ if (activeUnit.canMove())
+ activeUnit.enableOverlay(Unit.MOVE, true);
}
activeUnit = unit;
Hex hex = activeUnit.getHex();