AttackBase handles canceling of (its) target when an unrelated order is issued

This commit is contained in:
Chris Forbes
2009-12-31 09:17:52 +13:00
parent 1ddc5dfbd7
commit e62c281019
5 changed files with 4 additions and 8 deletions

View File

@@ -56,10 +56,6 @@ namespace OpenRa.Game.Traits
{
self.CancelActivity();
self.QueueActivity(new Activities.Move(order.TargetLocation, 8));
var attackBase = self.traits.WithInterface<AttackBase>().FirstOrDefault();
if (attackBase != null)
attackBase.target = null; /* move cancels attack order */
}
}