summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-04-22 00:00:46 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-04-22 00:00:46 +0200
commiteac3e6b04638127c8fa5c10d92e1c3bbf0bee421 (patch)
treeb21ffce1e8e0f965199c6658fb787fe2c8721bca /core/src
parent6474c32671efae0bc9ebd04081ec1d4590796029 (diff)
downloadRustAndDust-eac3e6b04638127c8fa5c10d92e1c3bbf0bee421.zip
RustAndDust-eac3e6b04638127c8fa5c10d92e1c3bbf0bee421.tar.gz
Unit: do not call setMoved if cost is 0
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Unit.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Unit.java b/core/src/ch/asynk/rustanddust/game/Unit.java
index e415ee3..836ac93 100644
--- a/core/src/ch/asynk/rustanddust/game/Unit.java
+++ b/core/src/ch/asynk/rustanddust/game/Unit.java
@@ -304,7 +304,7 @@ public class Unit extends HeadedPawn
if (cost > mpLeft)
RustAndDust.debug("ERROR: Movement point exceeded: " + cost + "/" + mpLeft + " please report");
- if (move.isFinal())
+ if ((cost > 0) && move.isFinal())
setMoved();
mpLeft -= cost;