Reset RequestedTargets that are cancelled before the first attack tick.

This commit is contained in:
Paul Chote
2019-06-20 20:42:57 +00:00
committed by reaperrr
parent 8f7426f579
commit ff9db0bf7a
3 changed files with 26 additions and 17 deletions

View File

@@ -392,11 +392,12 @@ namespace OpenRA.Mods.Common.Traits
if (!queued)
self.CancelActivity();
self.QueueActivity(GetAttackActivity(self, target, allowMove, forceAttack));
OnQueueAttackActivity(self, target, queued, allowMove, forceAttack);
var activity = GetAttackActivity(self, target, allowMove, forceAttack);
self.QueueActivity(activity);
OnQueueAttackActivity(self, activity, target, allowMove, forceAttack);
}
public virtual void OnQueueAttackActivity(Actor self, Target target, bool queued, bool allowMove, bool forceAttack) { }
public virtual void OnQueueAttackActivity(Actor self, Activity activity, Target target, bool allowMove, bool forceAttack) { }
public bool IsReachableTarget(Target target, bool allowMove)
{