diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-18 11:40:58 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-18 11:40:58 +0100 |
commit | ac703cfa069d256f4643b1c59a966673939eca40 (patch) | |
tree | ddb2c8974543d5efcef9624e1619a7e816187913 /core/src/ch/asynk | |
parent | a59576eeab882ad6fe059e1507dd37d8716a86d7 (diff) | |
download | RustAndDust-ac703cfa069d256f4643b1c59a966673939eca40.zip RustAndDust-ac703cfa069d256f4643b1c59a966673939eca40.tar.gz |
UnitDock: setPosition() does nothing if position stays the same
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/hud/UnitDock.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/UnitDock.java b/core/src/ch/asynk/tankontank/game/hud/UnitDock.java index 40d118b..2cae15c 100644 --- a/core/src/ch/asynk/tankontank/game/hud/UnitDock.java +++ b/core/src/ch/asynk/tankontank/game/hud/UnitDock.java @@ -70,6 +70,8 @@ public class UnitDock extends Bg implements Animation public void setPosition(Position position, float y) { + if (this.position == position) + return; this.position = position; this.y = y; this.step = (position.isLeft() ? STEP : -STEP); |