diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-11 21:26:50 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-11-11 21:26:50 +0100 |
commit | 5ebb6356cff2f391652ff25abb34c83f1e6903fc (patch) | |
tree | 1e8b805ed964d2f9cecba38976e8f0ac99197627 /core/src/ch/asynk/rustanddust | |
parent | 289db294f15c5afb2eee1d4c991a78ebf5ff0e6a (diff) | |
download | RustAndDust-5ebb6356cff2f391652ff25abb34c83f1e6903fc.zip RustAndDust-5ebb6356cff2f391652ff25abb34c83f1e6903fc.tar.gz |
UnitDock: recompute reinforcement units in dock if player change
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/hud/UnitDock.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/hud/UnitDock.java b/core/src/ch/asynk/rustanddust/game/hud/UnitDock.java index 9a7811e..c249c64 100644 --- a/core/src/ch/asynk/rustanddust/game/hud/UnitDock.java +++ b/core/src/ch/asynk/rustanddust/game/hud/UnitDock.java @@ -158,9 +158,11 @@ public class UnitDock extends Bg implements Animation n = 0; return false; } - if (count == n) return true; - n = count; + if ((count == n) && (units == ctrl.player.reinforcement)) + return true; + + n = count; units = ctrl.player.reinforcement; rect.width = units.get(0).getWidth() + (2 * padding); rect.height = ((units.get(0).getHeight() * n) + ((n + 1) * padding)); |