Split IFinalizedRenderable from Renderable to remove mutable structs.
This commit is contained in:
@@ -14,7 +14,7 @@ using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Mods.Common.Graphics
|
||||
{
|
||||
public struct ContrailRenderable : IRenderable
|
||||
public struct ContrailRenderable : IRenderable, IFinalizedRenderable
|
||||
{
|
||||
public int Length { get { return trail.Length; } }
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
public IRenderable OffsetBy(WVec vec) { return new ContrailRenderable(world, trail.Select(pos => pos + vec).ToArray(), next, length, skip, color, zOffset); }
|
||||
public IRenderable AsDecoration() { return this; }
|
||||
|
||||
public void BeforeRender(WorldRenderer wr) { }
|
||||
public IFinalizedRenderable PrepareRender(WorldRenderer wr) { return this; }
|
||||
public void Render(WorldRenderer wr)
|
||||
{
|
||||
// Need at least 4 points to smooth the contrail over
|
||||
|
||||
Reference in New Issue
Block a user