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:
@@ -72,7 +72,9 @@ namespace OpenRA.Mods.RA.Effects
|
||||
var shadow = wr.Palette("shadow");
|
||||
foreach (var c in rc)
|
||||
{
|
||||
yield return c.WithPalette(shadow).WithZOffset(-1);
|
||||
if (!c.IsDecoration)
|
||||
yield return c.WithPalette(shadow).WithZOffset(c.ZOffset - 1).AsDecoration();
|
||||
|
||||
yield return c.OffsetBy(pos - c.Pos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user