Add Team.Patrol and Actor.Patrol. Fixes #4491.

This commit is contained in:
Oliver Brakmann
2014-01-28 23:06:25 +01:00
parent 43e386a48d
commit 5322096dc4
3 changed files with 33 additions and 7 deletions

View File

@@ -299,12 +299,12 @@ namespace OpenRA.Mods.RA.Scripting
}
[LuaGlobal]
public void AttackMove(Actor actor, CPos location)
public void AttackMove(Actor actor, CPos location, double nearEnough)
{
if (actor.HasTrait<AttackMove>())
actor.QueueActivity(new AttackMove.AttackMoveActivity(actor, new Move.Move(location, 0)));
actor.QueueActivity(new AttackMove.AttackMoveActivity(actor, new Move.Move(location, (int)nearEnough)));
else
actor.QueueActivity(new Move.Move(location, 0));
actor.QueueActivity(new Move.Move(location, (int)nearEnough));
}
[LuaGlobal]