summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-04-11 16:26:04 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-04-11 16:26:04 +0200
commit031ad670a7ec12c755e2c34baf5a2b79a32df473 (patch)
tree35a0f81f13948791d4133b7a65ac71313a052e8b /core/src/ch/asynk/rustanddust
parentd26eb7e8a2ebff62e5a410f8aa315d7708734f3a (diff)
downloadRustAndDust-031ad670a7ec12c755e2c34baf5a2b79a32df473.zip
RustAndDust-031ad670a7ec12c755e2c34baf5a2b79a32df473.tar.gz
Map4Orders: compute activableUnits (break move) only on success
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map4Orders.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
index 6893b2a..1403e6a 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
@@ -272,10 +272,12 @@ public abstract class Map4Orders extends Map3Animations
} else {
resolveEngagement(e);
activableUnits.clear();
- for (Unit u : activatedUnits) {
- u.engage();
- if (u.canBreak())
- activableUnits.add(u);
+ if (e.success) {
+ for (Unit u : activatedUnits) {
+ u.engage();
+ if (u.canBreak())
+ activableUnits.add(u);
+ }
}
}