summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-12-18 11:41:13 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-12-18 11:41:13 +0100
commit3cb3e0503e193e1aa5343991d88431b55612c701 (patch)
tree4de80a096ddb743d6d94631c1f68c7706844a7bc /core/src/ch
parentac703cfa069d256f4643b1c59a966673939eca40 (diff)
downloadRustAndDust-3cb3e0503e193e1aa5343991d88431b55612c701.zip
RustAndDust-3cb3e0503e193e1aa5343991d88431b55612c701.tar.gz
PlayerInfo: setPosition() does nothing if position stays the same
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java b/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java
index 7489fd4..d858d7d 100644
--- a/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java
+++ b/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java
@@ -70,6 +70,8 @@ public class PlayerInfo implements Disposable, Drawable, Animation
public void setPosition(Position position)
{
+ if (this.position == position)
+ return;
this.position = position;
float width = (usFlag.getWidth() + turns.getWidth() + aps.getWidth() + (2 * PADDING));