Before You Report
Version
1.1.3
Description
In mentioned method, Priority is squared, thus the sign of Priority is irrelevant
To Reproduce
Try to create a waypoint that your client doesn't want to use by setting high negative priority, then still get caught by the waypoint.
Expected Behavior
sign of priority should make waypoint more or less favorable, not just 0 -> infinity more favorable
Additional Information
Here's a fix based off copied decompiled code:
public override float SqrDistanceTo(Vector3 pos)
{
if (this.IsStatic)
return (pos - this._transform.position).sqrMagnitude - this.Priority * this.Priority * Mathf.Sign(this.Priority);
Vector3 point = this._transform.InverseTransformPoint(pos);
return !AdminToyWaypoint.DefaultBounds.Contains(point) ? float.MaxValue : point.sqrMagnitude - this.Priority * this.Priority * Mathf.Sign(this.Priority);
}
(All I did was add "* Mathf.Sign")
Before You Report
Version
1.1.3
Description
In mentioned method, Priority is squared, thus the sign of Priority is irrelevant
To Reproduce
Try to create a waypoint that your client doesn't want to use by setting high negative priority, then still get caught by the waypoint.
Expected Behavior
sign of priority should make waypoint more or less favorable, not just 0 -> infinity more favorable
Additional Information
Here's a fix based off copied decompiled code:
public override float SqrDistanceTo(Vector3 pos)
{
if (this.IsStatic)
return (pos - this._transform.position).sqrMagnitude - this.Priority * this.Priority * Mathf.Sign(this.Priority);
Vector3 point = this._transform.InverseTransformPoint(pos);
return !AdminToyWaypoint.DefaultBounds.Contains(point) ? float.MaxValue : point.sqrMagnitude - this.Priority * this.Priority * Mathf.Sign(this.Priority);
}
(All I did was add "* Mathf.Sign")