diff --git a/OpenRA.Mods.RA/Widgets/Logic/Ingame/GameInfoStatsLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/Ingame/GameInfoStatsLogic.cs index 0b56ef02d4..a056a0be85 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/Ingame/GameInfoStatsLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/Ingame/GameInfoStatsLogic.cs @@ -43,9 +43,15 @@ namespace OpenRA.Mods.RA.Widgets.Logic foreach (var p in world.Players.Where(a => !a.NonCombatant)) { var pp = p; + var client = world.LobbyInfo.ClientWithIndex(pp.ClientIndex); var item = playerTemplate.Clone(); var nameLabel = item.Get("NAME"); - nameLabel.GetText = () => pp.WinState == WinState.Lost ? pp.PlayerName + " (Dead)" : pp.PlayerName; + nameLabel.GetText = () => + { + if (client.State == Network.Session.ClientState.Disconnected) + return pp.PlayerName + " (Gone)"; + return pp.PlayerName + (pp.WinState == WinState.Undefined ? "" : " (" + pp.WinState + ")"); + }; nameLabel.GetColor = () => pp.Color.RGB; var flag = item.Get("FACTIONFLAG"); @@ -54,7 +60,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic item.Get("FACTION").GetText = () => pp.Country.Name; var team = item.Get("TEAM"); - var client = world.LobbyInfo.ClientWithIndex(pp.ClientIndex); var teamNumber = (client == null) ? 0 : client.Team; team.GetText = () => (teamNumber == 0) ? "-" : teamNumber.ToString(); playerPanel.AddChild(item); diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs index c306b67e82..e55aa98d3e 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyUtils.cs @@ -454,7 +454,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic flag.GetImageCollection = () => "flags"; var playerName = template.Get("PLAYER"); - playerName.GetText = () => player.PlayerName + (player.WinState == WinState.Undefined ? "" : " (" + player.WinState + ")"); + var client = player.World.LobbyInfo.ClientWithIndex(player.ClientIndex); + playerName.GetText = () => + { + if (client.State == Network.Session.ClientState.Disconnected) + return player.PlayerName + " (Gone)"; + return player.PlayerName + (player.WinState == WinState.Undefined ? "" : " (" + player.WinState + ")"); + }; playerName.GetColor = () => player.Color.RGB; } }