Remove Util.GetFacing.
This commit is contained in:
@@ -38,7 +38,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return false;
|
||||
|
||||
var f = facing.Value.Facing;
|
||||
var facingToTarget = Util.GetFacing(target.CenterPosition - self.CenterPosition, f);
|
||||
var delta = target.CenterPosition - self.CenterPosition;
|
||||
var facingToTarget = delta.HorizontalLengthSquared != 0 ? delta.Yaw.Facing : f;
|
||||
|
||||
if (Math.Abs(facingToTarget - f) % 256 > info.FacingTolerance)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user