group IPostRenderSelection impls by type, not by actor
This commit is contained in:
@@ -99,9 +99,10 @@ namespace OpenRA.Graphics
|
|||||||
shroudRenderer.Draw( this );
|
shroudRenderer.Draw( this );
|
||||||
Game.Renderer.DisableScissor();
|
Game.Renderer.DisableScissor();
|
||||||
|
|
||||||
foreach (var a in world.Selection.Actors)
|
foreach (var g in world.Selection.Actors.Where(a => !a.Destroyed)
|
||||||
if (!a.Destroyed)
|
.SelectMany(a => a.TraitsImplementing<IPostRenderSelection>())
|
||||||
foreach (var t in a.TraitsImplementing<IPostRenderSelection>())
|
.GroupBy(prs => prs.GetType()))
|
||||||
|
foreach (var t in g)
|
||||||
t.RenderAfterWorld(this);
|
t.RenderAfterWorld(this);
|
||||||
|
|
||||||
Game.Renderer.Flush();
|
Game.Renderer.Flush();
|
||||||
|
|||||||
Reference in New Issue
Block a user