Convert mission scripts to world coords.

This commit is contained in:
Paul Chote
2013-07-20 13:08:08 +12:00
parent 1dfc4837d4
commit 6201d7bfe2
11 changed files with 44 additions and 43 deletions

View File

@@ -148,7 +148,7 @@ namespace OpenRA.Mods.Cnc.Missions
IEnumerable<Actor> UnitsNearActor(Actor actor, int range)
{
return world.FindUnitsInCircle(actor.CenterLocation, Game.CellSize * range)
return world.FindUnitsInCircle(actor.CenterPosition, WRange.FromCells(range))
.Where(a => a.IsInWorld && a != world.WorldActor && !a.Destroyed && a.HasTrait<IMove>() && !a.Owner.NonCombatant);
}