From bc5eb6608890748d4954a5e4630e8264fa566b89 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Wed, 24 May 2017 00:26:15 +0200 Subject: [PATCH] Add OuterRadius debug overlay to Rectangle and Capsule Circle obviously doesn't need it now (might change with the introduction of offsets, but we can still add it when that happens). --- OpenRA.Mods.Common/HitShapes/Capsule.cs | 2 ++ OpenRA.Mods.Common/HitShapes/Rectangle.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/OpenRA.Mods.Common/HitShapes/Capsule.cs b/OpenRA.Mods.Common/HitShapes/Capsule.cs index c430b83782..26335eabc3 100644 --- a/OpenRA.Mods.Common/HitShapes/Capsule.cs +++ b/OpenRA.Mods.Common/HitShapes/Capsule.cs @@ -119,6 +119,8 @@ namespace OpenRA.Mods.Common.HitShapes RangeCircleRenderable.DrawRangeCircle(wr, bb, Radius, 1, c, 0, c); wcr.DrawLine(new[] { wr.Screen3DPosition(aa - offset2), wr.Screen3DPosition(bb - offset2) }, 1, c); wcr.DrawLine(new[] { wr.Screen3DPosition(aa + offset2), wr.Screen3DPosition(bb + offset2) }, 1, c); + + RangeCircleRenderable.DrawRangeCircle(wr, actorPos, OuterRadius, 1, Color.LimeGreen, 0, Color.LimeGreen); } } } \ No newline at end of file diff --git a/OpenRA.Mods.Common/HitShapes/Rectangle.cs b/OpenRA.Mods.Common/HitShapes/Rectangle.cs index 6ea8c9a68b..dc8a35f4a6 100644 --- a/OpenRA.Mods.Common/HitShapes/Rectangle.cs +++ b/OpenRA.Mods.Common/HitShapes/Rectangle.cs @@ -13,6 +13,7 @@ using System; using System.Drawing; using System.Linq; using OpenRA.Graphics; +using OpenRA.Mods.Common.Graphics; using OpenRA.Traits; namespace OpenRA.Mods.Common.HitShapes @@ -139,6 +140,8 @@ namespace OpenRA.Mods.Common.HitShapes wcr.DrawPolygon(vertsTop.ToArray(), 1, Color.Yellow); wcr.DrawPolygon(vertsBottom.ToArray(), 1, Color.Yellow); } + + RangeCircleRenderable.DrawRangeCircle(wr, actorPos, OuterRadius, 1, Color.LimeGreen, 0, Color.LimeGreen); } } }