WorldRenderer: use string.IsNullOrEmpty for check in Palette method

Unified usage of WorldRenderer.Palette method when it comes to appending player name (in case of player palette)
This commit is contained in:
michaeldgg2
2023-06-02 12:07:14 +02:00
committed by Gustas
parent b944b21325
commit 1a2d43fc99
4 changed files with 5 additions and 10 deletions

View File

@@ -51,10 +51,7 @@ namespace OpenRA.Mods.Common.Traits.Render
yield break;
if (Palette != null)
{
var ownerName = init.Get<OwnerInit>().InternalName;
p = init.WorldRenderer.Palette(IsPlayerPalette ? Palette + ownerName : Palette);
}
p = init.WorldRenderer.Palette(IsPlayerPalette ? Palette + init.Get<OwnerInit>().InternalName : Palette);
Func<WAngle> facing;
var dynamicfacingInit = init.GetOrDefault<DynamicFacingInit>();