From 3cb3e0503e193e1aa5343991d88431b55612c701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 18 Dec 2014 11:41:13 +0100 Subject: PlayerInfo: setPosition() does nothing if position stays the same --- core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java | 2 ++ 1 file changed, 2 insertions(+) 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)); -- cgit v1.1-2-g2b99