This commit is contained in:
Chris Forbes
2009-12-28 12:43:23 +13:00
parent 77bb949411
commit daaf9686b7

View File

@@ -14,6 +14,8 @@ namespace OpenRa.Game.Traits
var attack = self.traits.WithInterface<AttackBase>().First();
if (target != null)
attack.ResolveOrder(self, new Order("Attack", self, target, int2.Zero, null));
else
self.CancelActivity();
}
float GetMaximumRange(Actor self)
@@ -40,8 +42,6 @@ namespace OpenRa.Game.Traits
public void Tick(Actor self)
{
if (!self.IsIdle) return;
var attack = self.traits.WithInterface<AttackBase>().First();
var range = GetMaximumRange(self);