More shroud refactoring.

This introduces a hash on Shroud which ShroudRenderer
can observe, removing the need to explicitly twiddle
a dirty flag between objects.

Shroud disabling is now done via RenderPlayer, so
enabling the cheat or winning/losing will now give
vis equivalent to an observer.
This commit is contained in:
Paul Chote
2013-04-10 20:27:33 +12:00
parent ca8dbce0ef
commit 248e815d99
9 changed files with 169 additions and 168 deletions

View File

@@ -127,7 +127,8 @@ namespace OpenRA.Graphics
if (world.OrderGenerator != null)
world.OrderGenerator.RenderAfterWorld(this, world);
shroudRenderer.Draw(this, world.RenderPlayer);
var renderShroud = world.RenderPlayer != null ? world.RenderPlayer.Shroud : null;
shroudRenderer.Draw(this, renderShroud);
Game.Renderer.DisableScissor();
foreach (var g in world.Selection.Actors.Where(a => !a.Destroyed)