15 lines
466 B
C#
15 lines
466 B
C#
using System.Numerics;
|
|
|
|
namespace Questionable.Controller.NavigationOverrides;
|
|
|
|
public sealed record BlacklistedPoint(ushort TerritoryId, Vector3 Original, Vector3 Replacement, float CheckDistance = 0.05f, bool RecalculateNavmesh = false) : IBlacklistedLocation
|
|
{
|
|
public AlternateLocation? AdjustPoint(Vector3 point)
|
|
{
|
|
if ((point - Original).Length() > CheckDistance)
|
|
{
|
|
return null;
|
|
}
|
|
return new AlternateLocation(Replacement, RecalculateNavmesh);
|
|
}
|
|
}
|