reinstate range circles; IRenderSelection allows arb. plugging in of these things

This commit is contained in:
Chris Forbes
2010-07-24 18:48:24 +12:00
committed by Paul Chote
parent 2254e48f65
commit f2bfa8e2ee
8 changed files with 72 additions and 40 deletions

View File

@@ -41,15 +41,8 @@ namespace OpenRA.Orders
{
world.WorldRenderer.DrawSelectionBox(a, Color.White, true);
if (a.Owner == world.LocalPlayer)
{
//if (a.traits.Contains<RenderRangeCircle>())
// world.WorldRenderer.DrawRangeCircle(Color.FromArgb(128, Color.Yellow),
// a.CenterLocation, (int)a.GetPrimaryWeapon().Range);
if (a.traits.Contains<DetectCloaked>())
world.WorldRenderer.DrawRangeCircle(Color.FromArgb(128, Color.LimeGreen),
a.CenterLocation, a.Info.Traits.Get<DetectCloakedInfo>().Range);
}
foreach (var t in a.traits.WithInterface<IRenderSelection>())
t.Render(a);
}
}