summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-12-18 11:40:58 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-12-18 11:40:58 +0100
commitac703cfa069d256f4643b1c59a966673939eca40 (patch)
treeddb2c8974543d5efcef9624e1619a7e816187913 /core/src
parenta59576eeab882ad6fe059e1507dd37d8716a86d7 (diff)
downloadRustAndDust-ac703cfa069d256f4643b1c59a966673939eca40.zip
RustAndDust-ac703cfa069d256f4643b1c59a966673939eca40.tar.gz
UnitDock: setPosition() does nothing if position stays the same
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/UnitDock.java2
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);