From 0e88585c271f77bda99b6f8eadb078cc4f58e233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 28 Nov 2014 21:30:44 +0100 Subject: StateMove: changeUnit() do not set MOVE overlay if has moved --- core/src/ch/asynk/tankontank/game/states/StateMove.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- cgit v1.1-2-g2b99