From 3cb3e0503e193e1aa5343991d88431b55612c701 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher 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(+) (limited to 'core/src/ch/asynk') diff --git a/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java b/core/src/ch/asynk/tankontank/game/hud/PlayerInfo.java index 7489fd46..d858d7da 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.2.3