diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-18 11:41:13 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-18 11:41:13 +0100 |
commit | 3cb3e0503e193e1aa5343991d88431b55612c701 (patch) | |
tree | 4de80a096ddb743d6d94631c1f68c7706844a7bc | |
parent | ac703cfa069d256f4643b1c59a966673939eca40 (diff) | |
download | RustAndDust-3cb3e0503e193e1aa5343991d88431b55612c701.zip RustAndDust-3cb3e0503e193e1aa5343991d88431b55612c701.tar.gz |
PlayerInfo: setPosition() does nothing if position stays the same
-rw-r--r-- | core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java | 2 |
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)); |