Fix armaments/projectiles to aim at closest Target.Positions
Instead of CenterPosition. TargetablePositions were already used for targeting/attack decisions, but not armaments/projectiles.
This commit is contained in:
committed by
Oliver Brakmann
parent
73577e3a7e
commit
7acc6dacbc
@@ -157,7 +157,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
|
||||
if (args.GuidedTarget.IsValidFor(args.SourceActor))
|
||||
{
|
||||
var guidedTargetPos = args.GuidedTarget.CenterPosition;
|
||||
var guidedTargetPos = args.GuidedTarget.Positions.PositionClosestTo(args.Source);
|
||||
var targetDistance = new WDist((guidedTargetPos - args.Source).Length);
|
||||
|
||||
// Only continue tracking target if it's within weapon range +
|
||||
|
||||
Reference in New Issue
Block a user