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

@@ -162,7 +162,8 @@ namespace OpenRA.Mods.Common.Traits
if (Cloaked && IsVisible(self, self.World.RenderPlayer))
{
var palette = string.IsNullOrEmpty(Info.Palette) ? null : Info.IsPlayerPalette ? wr.Palette(Info.Palette + self.Owner.InternalName) : wr.Palette(Info.Palette);
var palette = wr.Palette(Info.IsPlayerPalette ? Info.Palette + self.Owner.InternalName : Info.Palette);
if (palette == null)
return r;
else