Add some logging to see what is going on.

This commit is contained in:
Paul Chote
2010-11-29 13:43:00 +13:00
parent c7f1d08748
commit da74c6ad23
5 changed files with 36 additions and 13 deletions

View File

@@ -39,13 +39,17 @@ 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
));
}
}
}
}