Use Target range checks in AutoTarget and dependencies.

This commit is contained in:
Paul Chote
2013-07-06 15:45:24 +12:00
parent 4a471eff8b
commit ec9054ceb1
5 changed files with 17 additions and 16 deletions

View File

@@ -47,9 +47,11 @@ namespace OpenRA.Mods.RA
if (self.Owner != self.World.LocalPlayer)
return;
// Hack: Convert world coords to cells
var pxRange = self.Trait<AttackBase>().GetMaximumRange().Range / 1024f;
wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, Color.Yellow),
self.CenterLocation.ToFloat2(), self.Trait<AttackBase>().GetMaximumRange(),
self.CenterLocation.ToFloat2(), pxRange,
Color.FromArgb(96, Color.Black),
1);
}