Remove palettes from base IRenderable.

This commit is contained in:
Paul Chote
2020-08-21 18:56:26 +01:00
committed by abcdefg30
parent 71b13c7b5d
commit b88495c689
28 changed files with 28 additions and 59 deletions

View File

@@ -118,8 +118,8 @@ namespace OpenRA.Mods.Common.Traits
if (Selected)
{
var highlight = worldRenderer.Palette("highlight");
var overlay = items.Where(r => !r.IsDecoration)
.Select(r => r.WithPalette(highlight));
var overlay = items.Where(r => !r.IsDecoration && r is IPalettedRenderable)
.Select(r => ((IPalettedRenderable)r).WithPalette(highlight));
return items.Concat(overlay);
}