diff --git a/OpenRA.Game/Graphics/WorldRenderer.cs b/OpenRA.Game/Graphics/WorldRenderer.cs index cf0773c0aa..ea6b61a1d0 100644 --- a/OpenRA.Game/Graphics/WorldRenderer.cs +++ b/OpenRA.Game/Graphics/WorldRenderer.cs @@ -120,10 +120,6 @@ namespace OpenRA.Graphics Game.Renderer.EnableScissor(bounds.Left, bounds.Top, bounds.Width, bounds.Height); terrainRenderer.Draw(this, Game.viewport); - foreach (var a in world.traitDict.ActorsWithTraitMultiple(world)) - foreach (var r in a.Trait.RenderAsTerrain(this, a.Actor)) - r.Render(this); - Game.Renderer.Flush(); for (var i = 0; i < renderables.Count; i++) diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 6b434464e7..62cb04cb45 100755 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -192,7 +192,6 @@ namespace OpenRA.Traits public interface IPostRender { void RenderAfterWorld(WorldRenderer wr, Actor self); } public interface IPostRenderSelection { void RenderAfterWorld(WorldRenderer wr); } - public interface IRenderAsTerrain { IEnumerable RenderAsTerrain(WorldRenderer wr, Actor self); } public interface IBodyOrientation { WAngle CameraPitch { get; } diff --git a/OpenRA.Mods.RA/Bridge.cs b/OpenRA.Mods.RA/Bridge.cs index 8a8b72d410..26c1bdd34d 100644 --- a/OpenRA.Mods.RA/Bridge.cs +++ b/OpenRA.Mods.RA/Bridge.cs @@ -67,7 +67,7 @@ namespace OpenRA.Mods.RA } } - class Bridge: IRenderAsTerrain, INotifyDamageStateChanged + class Bridge: IRender, INotifyDamageStateChanged { ushort template; Dictionary footprint; @@ -125,12 +125,12 @@ namespace OpenRA.Mods.RA { return footprint.Select(c => (IRenderable)(new SpriteRenderable( wr.Theater.TileSprite(new TileReference(template, c.Value)), - c.Key.CenterPosition, WVec.Zero, 0, palette, 1f, true))).ToArray(); + c.Key.CenterPosition, WVec.Zero, -512, palette, 1f, true))).ToArray(); } bool initialized; Dictionary renderables; - public IEnumerable RenderAsTerrain(WorldRenderer wr, Actor self) + public IEnumerable Render(Actor self, WorldRenderer wr) { if (!initialized) {