Adapt Attack logic to Weapon.TargetActorCenter
This commit is contained in:
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
var f = facing.Facing;
|
||||
var pos = self.CenterPosition;
|
||||
var targetedPosition = Info.AttackTargetCenter ? target.CenterPosition : target.Positions.PositionClosestTo(pos);
|
||||
var targetedPosition = GetTargetPosition(pos, target);
|
||||
var delta = targetedPosition - pos;
|
||||
var facingToTarget = delta.HorizontalLengthSquared != 0 ? delta.Yaw.Facing : f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user