Fix turreted immovable actors not dropping targets that are out of range

This commit is contained in:
teees
2015-11-04 09:19:58 +01:00
committed by Oliver Brakmann
parent e95cb7540d
commit dc6d31cec8

View File

@@ -96,8 +96,11 @@ namespace OpenRA.Mods.Common.Traits
if (move != null)
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;
}
}