Add plumbing for targeting of target center instead of closest targetable position
Note: Projectiles that can track their target need minor additional changes, but for InstantHit (which already implemented support for this) and unguided projectiles (Bullet, GravityBomb) this commit is already sufficient.
This commit is contained in:
@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return;
|
||||
|
||||
var pos = self.CenterPosition;
|
||||
var targetedPosition = target.Positions.PositionClosestTo(pos);
|
||||
var targetedPosition = Info.AttackTargetCenter ? target.CenterPosition : target.Positions.PositionClosestTo(pos);
|
||||
var targetYaw = (targetedPosition - pos).Yaw;
|
||||
|
||||
foreach (var a in Armaments)
|
||||
|
||||
Reference in New Issue
Block a user