Fix turreted immovable actors not dropping targets that are out of range
This commit is contained in:
@@ -96,8 +96,11 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
if (move != null)
|
if (move != null)
|
||||||
return ActivityUtils.SequenceActivities(move.MoveFollow(self, target, weapon.Weapon.MinRange, maxRange), this);
|
return ActivityUtils.SequenceActivities(move.MoveFollow(self, target, weapon.Weapon.MinRange, maxRange), this);
|
||||||
|
if (target.IsInRange(self.CenterPosition, weapon.MaxRange()) && !target.IsInRange(self.CenterPosition, weapon.Weapon.MinRange))
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
attack.Target = Target.Invalid;
|
||||||
return NextActivity;
|
return NextActivity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user