From 442d91537ee2f104d844738476b0caaa9ed5c664 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 27 Aug 2021 00:00:02 +0100 Subject: [PATCH] Don't display spectator info for scripted players. --- OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs index 1af074031a..09aad4a4d1 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverStatsLogic.cs @@ -66,7 +66,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic for (var i = 0; i < keyNames.Length; i++) statsHotkeys[i] = logicArgs.TryGetValue("Statistics" + keyNames[i] + "Key", out yaml) ? modData.Hotkeys[yaml.Value] : new HotkeyReference(); - players = world.Players.Where(p => !p.NonCombatant); + players = world.Players.Where(p => !p.NonCombatant && p.Playable); teams = players.GroupBy(p => (world.LobbyInfo.ClientWithIndex(p.ClientIndex) ?? new Session.Client()).Team).OrderBy(g => g.Key); hasTeams = !(teams.Count() == 1 && teams.First().Key == 0);