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:
@@ -54,6 +54,7 @@ namespace OpenRA.Graphics
|
||||
public float Scale { get { return scale; } }
|
||||
public PaletteReference Palette { get { return palette; } }
|
||||
public int ZOffset { get { return zOffset; } }
|
||||
public bool IsDecoration { get { return false; } }
|
||||
|
||||
public IRenderable WithScale(float newScale)
|
||||
{
|
||||
@@ -83,6 +84,8 @@ namespace OpenRA.Graphics
|
||||
palette, normalsPalette, shadowPalette);
|
||||
}
|
||||
|
||||
public IRenderable AsDecoration() { return this; }
|
||||
|
||||
// This will need generalizing once we support TS/RA2 terrain
|
||||
static readonly float[] groundNormal = new float[] {0,0,1,1};
|
||||
public void BeforeRender(WorldRenderer wr)
|
||||
|
||||
Reference in New Issue
Block a user