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

@@ -49,8 +49,8 @@ namespace OpenRA.Mods.Common.Traits.Render
// Contrails shouldn't cast shadows
var height = self.World.Map.DistanceAboveTerrain(self.CenterPosition).Length;
var shadowSprites = r.Where(s => !s.IsDecoration)
.Select(a => a.WithPalette(wr.Palette(info.Palette))
var shadowSprites = r.Where(s => !s.IsDecoration && s is IPalettedRenderable)
.Select(a => ((IPalettedRenderable)a).WithPalette(wr.Palette(info.Palette))
.OffsetBy(info.Offset - new WVec(0, 0, height))
.WithZOffset(a.ZOffset + (height + info.ZOffset))
.AsDecoration());