diff --git a/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs index 003af771f0..c3edd02114 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs @@ -18,6 +18,7 @@ using System.Threading; using System.Threading.Tasks; using OpenRA.FileFormats; using OpenRA.Primitives; +using OpenRA.Traits; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic @@ -32,6 +33,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly List replays = new List(); readonly Dictionary replayState = new Dictionary(); readonly Action onStart; + readonly ModData modData; Dictionary selectedSpawns; ReplayMetadata selectedReplay; @@ -43,6 +45,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { panel = widget; + this.modData = modData; this.onStart = onStart; playerList = panel.Get("PLAYER_LIST"); @@ -649,7 +652,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic var flag = item.Get("FLAG"); flag.GetImageCollection = () => "flags"; - flag.GetImageName = () => o.FactionId; + var factionInfo = modData.DefaultRules.Actors["world"].TraitInfos(); + flag.GetImageName = () => (factionInfo != null && factionInfo.Any(f => f.InternalName == o.FactionId)) ? o.FactionId : "Random"; playerList.AddChild(item); }