Fix idle animations / prone.

This commit is contained in:
Paul Chote
2010-11-30 12:51:25 +13:00
parent 5070a81db4
commit 2d224a207c
5 changed files with 72 additions and 88 deletions

View File

@@ -39,17 +39,13 @@ namespace OpenRA.Mods.RA
public void TickIdle( Actor self )
{
System.Console.WriteLine("AutoTarget:TickIdle");
var attack = self.Trait<AttackBase>();
var currentTarget = attack.ScanForTarget(self, null);
if( currentTarget != null )
{
System.Console.WriteLine("AutoTarget: Queing attack activity");
self.QueueActivity(attack.GetAttackActivity( self,
Target.FromActor(currentTarget),
self.Info.Traits.Get<AutoTargetInfo>().AllowMovement
));
}
}
}
}