Introduce IRenderable.IsDecoration and AsDecoration.
These are used to filter *Renderables that shouldn't be copied for things like highlight or shadow.
This commit is contained in:
@@ -31,9 +31,11 @@ namespace OpenRA.Mods.RA.Render
|
||||
? (int)Math.Abs((self.ActorID + Game.LocalTick) / 5 % 4 - 1) - 1 : 0;
|
||||
|
||||
// Contrails shouldn't cast shadows
|
||||
var shadowSprites = r.Where(s => !(s is ContrailRenderable))
|
||||
var shadowSprites = r.Where(s => !s.IsDecoration)
|
||||
.Select(a => a.WithPalette(wr.Palette("shadow"))
|
||||
.OffsetBy(new WVec(0, 0, -a.Pos.Z)).WithZOffset(a.ZOffset + a.Pos.Z));
|
||||
.OffsetBy(new WVec(0, 0, -a.Pos.Z))
|
||||
.WithZOffset(a.ZOffset + a.Pos.Z)
|
||||
.AsDecoration());
|
||||
|
||||
var worldVisualOffset = new WVec(0,0,-43*visualOffset);
|
||||
var flyingSprites = !flying ? r :
|
||||
|
||||
Reference in New Issue
Block a user