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:
@@ -63,8 +63,10 @@ namespace OpenRA.Mods.RA.Render
|
||||
foreach (var a in r)
|
||||
{
|
||||
yield return a;
|
||||
if (disabled)
|
||||
yield return a.WithPalette(wr.Palette("disabled")).WithZOffset(1);
|
||||
if (disabled && !a.IsDecoration)
|
||||
yield return a.WithPalette(wr.Palette("disabled"))
|
||||
.WithZOffset(a.ZOffset + 1)
|
||||
.AsDecoration();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user