Make player stance colours universally respected

This commit is contained in:
Gustas
2023-02-25 13:42:43 +02:00
committed by Matthias Mailänder
parent 2f331548e1
commit 5fc36bd45f
38 changed files with 110 additions and 88 deletions

View File

@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits.Render
{
this.info = info;
font = Game.Renderer.Fonts[info.Font];
color = info.UsePlayerColor ? self.Owner.Color : info.Color;
color = info.UsePlayerColor ? self.OwnerColor() : info.Color;
label = new CachedTransform<int, string>(g => self.World.ControlGroups.Groups[g]);
}
@@ -81,7 +81,7 @@ namespace OpenRA.Mods.Common.Traits.Render
void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
{
if (info.UsePlayerColor)
color = newOwner.Color;
color = self.OwnerColor();
}
}
}