Add a debug visualization for screen map rectangles.

This commit is contained in:
Paul Chote
2017-12-03 23:06:48 +00:00
committed by reaperrr
parent 0f512088d2
commit 9d2935935c
9 changed files with 59 additions and 1 deletions

View File

@@ -212,6 +212,13 @@ namespace OpenRA.Graphics
r.RenderDebugGeometry(this);
}
if (debugVis.Value != null && debugVis.Value.ScreenMap)
foreach (var r in World.ScreenMap.ItemBounds(World.RenderPlayer))
Game.Renderer.WorldRgbaColorRenderer.DrawRect(
new float3(r.Left, r.Top, r.Bottom),
new float3(r.Right, r.Bottom, r.Bottom),
1 / Viewport.Zoom, Color.MediumSpringGreen);
Game.Renderer.Flush();
}