From 2fd7621a819b01086b985d4300aef3141dd4032a Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Thu, 7 Aug 2014 18:44:27 -0500 Subject: [PATCH] Display proper team in Arcade Lobby (Fixes bug where a player connecting will break scoreboards) --- .../game/arcade/managers/GameLobbyManager.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java index 9f9822f23..95ad437f2 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java @@ -173,12 +173,16 @@ public class GameLobbyManager implements IPacketRunnable, Listener } } } - + if (resendToAll) { for (Player otherPlayer : UtilServer.getPlayers()) { - AddPlayerToScoreboards(otherPlayer, null); + String teamName = null; + if (Manager.GetGame() != null && Manager.GetGame().GetTeam(otherPlayer) != null) + teamName = Manager.GetGame().GetTeam(otherPlayer).GetName().toUpperCase(); + + AddPlayerToScoreboards(otherPlayer, teamName); } } } @@ -1085,7 +1089,7 @@ public class GameLobbyManager implements IPacketRunnable, Listener } teamName = rankName + teamName; - + for (Scoreboard scoreboard : GetScoreboards()) { try