diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-04-22 00:00:46 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-04-22 00:00:46 +0200 |
commit | eac3e6b04638127c8fa5c10d92e1c3bbf0bee421 (patch) | |
tree | b21ffce1e8e0f965199c6658fb787fe2c8721bca /core/src/ch/asynk/rustanddust | |
parent | 6474c32671efae0bc9ebd04081ec1d4590796029 (diff) | |
download | RustAndDust-eac3e6b04638127c8fa5c10d92e1c3bbf0bee421.zip RustAndDust-eac3e6b04638127c8fa5c10d92e1c3bbf0bee421.tar.gz |
Unit: do not call setMoved if cost is 0
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Unit.java | 2 |
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; |