Fix NPC arrival distance for nodes (#15193)

This commit is contained in:
metalgearsloth
2023-04-07 20:54:20 +10:00
committed by GitHub
parent 97a8b64c1d
commit 9b616784ed

View File

@@ -92,7 +92,7 @@ public sealed partial class NPCSteeringSystem
// This is to avoid popping it too early // This is to avoid popping it too early
else if (steering.CurrentPath.TryPeek(out var node) && node.Data.IsFreeSpace) else if (steering.CurrentPath.TryPeek(out var node) && node.Data.IsFreeSpace)
{ {
arrivalDistance = MathF.Min(node.Box.Width, node.Box.Height) - 0.01f; arrivalDistance = MathF.Min(node.Box.Width / 2f, node.Box.Height / 2f) - 0.01f;
} }
// Try getting into blocked range I guess? // Try getting into blocked range I guess?
// TODO: Consider melee range or the likes. // TODO: Consider melee range or the likes.