make attackmove on spawn work properly for things that cant attackmove

This commit is contained in:
Chris Forbes
2012-04-25 21:05:49 +12:00
parent 49f3f740e3
commit 89025a3042
2 changed files with 11 additions and 6 deletions

View File

@@ -87,7 +87,8 @@ namespace OpenRA.Mods.RA
var mobile = newUnit.TraitOrDefault<Mobile>();
if (mobile != null)
{
newUnit.QueueActivity(new AttackMove.AttackMoveActivity(mobile.MoveTo(rp.rallyPoint, 1)));
newUnit.QueueActivity(new AttackMove.AttackMoveActivity(
newUnit, mobile.MoveTo(rp.rallyPoint, 1)));
return rp.rallyPoint;
}