Fix random country display.
This commit is contained in:
@@ -50,6 +50,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Name = "Everyone",
|
||||
NonCombatant = true,
|
||||
Spectating = true,
|
||||
Race = "Random",
|
||||
Allies = w.Players.Where(p => !p.NonCombatant && p.Playable).Select(p => p.InternalName).ToArray()
|
||||
}));
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
else
|
||||
{
|
||||
flag.GetImageName = () => pp.PlayerReference.RaceFlagName;
|
||||
item.Get<LabelWidget>("FACTION").GetText = () => pp.PlayerReference.Race;
|
||||
flag.GetImageName = () => pp.DisplayCountry.Race;
|
||||
item.Get<LabelWidget>("FACTION").GetText = () => pp.DisplayCountry.Name;
|
||||
}
|
||||
|
||||
var team = item.Get<LabelWidget>("TEAM");
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var flag = template.Get<ImageWidget>("FLAG");
|
||||
flag.GetImageCollection = () => "flags";
|
||||
if (player.World.RenderPlayer != null && player.World.RenderPlayer.Stances[player] != Stance.Ally)
|
||||
flag.GetImageName = () => player.PlayerReference.RaceFlagName;
|
||||
flag.GetImageName = () => player.DisplayCountry.Race;
|
||||
else
|
||||
flag.GetImageName = () => player.Country.Race;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user