Use Target range checks in attack activities.

This commit is contained in:
Paul Chote
2013-07-06 15:25:13 +12:00
parent 399aac7e0f
commit 6f67602d57
12 changed files with 39 additions and 39 deletions

View File

@@ -82,7 +82,7 @@ namespace OpenRA.Mods.RA.Missions
var targetEnemy = enemies.OrderBy(u => (self.CenterLocation - u.CenterLocation).LengthSquared).FirstOrDefault();
if (targetEnemy != null)
{
self.QueueActivity(new AttackMove.AttackMoveActivity(self, new Attack(Target.FromActor(targetEnemy), 6)));
self.QueueActivity(new AttackMove.AttackMoveActivity(self, new Attack(Target.FromActor(targetEnemy), WRange.FromCells(6))));
}
}