Skip to content

Commit

Permalink
Issue #179 Fix z-order for D2BuildingPlacementRenderable
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniysergeev committed Jun 9, 2022
1 parent 630de95 commit 12b71d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OpenRA.Mods.D2/Graphics/D2BuildingPlacementRenderable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ public D2BuildingPlacementRenderable(WPos pos, Rectangle bounds, Color color, bo
public void Render(WorldRenderer wr)
{
var rect = ScreenBounds(wr);
var tl = new float3(rect.Left, rect.Top, 1.0f);
var br = new float3(rect.Right, rect.Bottom, 1.0f);
var tl = new float3(rect.Left, rect.Top, 1024.0f);
var br = new float3(rect.Right, rect.Bottom, 1024.0f);
var width = 1.0f;
Game.Renderer.WorldRgbaColorRenderer.DrawRect(tl, br, width, color);
if (crossEnabled)
{
Game.Renderer.WorldRgbaColorRenderer.DrawLine(tl, br, width, color);
var tr = new float3(br.X, tl.Y, 1.0f);
var bl = new float3(tl.X, br.Y, 1.0f);
var tr = new float3(br.X, tl.Y, 1024.0f);
var bl = new float3(tl.X, br.Y, 1024.0f);
Game.Renderer.WorldRgbaColorRenderer.DrawLine(tr, bl, width, color);
}
}
Expand Down

0 comments on commit 12b71d3

Please sign in to comment.