Remove Mobile assumptions from Lua APIs.

This commit is contained in:
Paul Chote
2014-10-04 13:30:06 +13:00
parent 802eaac87b
commit 772994c1c4
2 changed files with 10 additions and 12 deletions

View File

@@ -33,7 +33,11 @@ namespace OpenRA.Mods.RA.Scripting
"close enough to complete the activity.")]
public void AttackMove(CPos cell, int closeEnough = 0)
{
self.QueueActivity(new AttackMove.AttackMoveActivity(self, new Move.Move(cell, WRange.FromCells(closeEnough))));
var move = self.TraitOrDefault<IMove>();
if (move == null)
return;
self.QueueActivity(new AttackMove.AttackMoveActivity(self, move.MoveTo(cell, closeEnough)));
}
}
}