Disallow attack-moving units from chasing their targets.
This commit is contained in:
@@ -56,14 +56,14 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (!IsCanceling && ChildActivity != null && ChildActivity.NextActivity == null && autoTarget != null)
|
||||
{
|
||||
// ScanForTarget already limits the scanning rate for performance so we don't need to do that here.
|
||||
var target = autoTarget.ScanForTarget(self, true, true);
|
||||
var target = autoTarget.ScanForTarget(self, false, true);
|
||||
if (target.Type != TargetType.Invalid)
|
||||
{
|
||||
// We have found a target so cancel the current move activity and queue attack activities.
|
||||
ChildActivity.Cancel(self);
|
||||
var attackBases = autoTarget.ActiveAttackBases;
|
||||
foreach (var ab in attackBases)
|
||||
QueueChild(ab.GetAttackActivity(self, target, true, false));
|
||||
QueueChild(ab.GetAttackActivity(self, target, false, false));
|
||||
|
||||
// Make sure to continue moving when the attack activities have finished.
|
||||
QueueChild(getInner());
|
||||
|
||||
Reference in New Issue
Block a user