Add world coords overload of FindUnitsInCircle.

This commit is contained in:
Paul Chote
2013-07-06 19:11:08 +12:00
parent e765fb6439
commit eec986d93d

View File

@@ -39,6 +39,11 @@ namespace OpenRA
return actors.OrderBy( a => (a.CenterLocation - px).LengthSquared ).FirstOrDefault();
}
public static IEnumerable<Actor> FindUnitsInCircle(this World world, WPos a, WRange r)
{
return world.FindUnitsInCircle(PPos.FromWPos(a), r.Range * Game.CellSize / 1024);
}
public static IEnumerable<Actor> FindUnitsInCircle(this World world, PPos a, int r)
{
using (new PerfSample("FindUnitsInCircle"))