From 9b616784ede928f756ab98a5668077bc188e4a87 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 7 Apr 2023 20:54:20 +1000 Subject: [PATCH] Fix NPC arrival distance for nodes (#15193) --- Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs b/Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs index 65c4315cf3..df7e13e65d 100644 --- a/Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs +++ b/Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs @@ -92,7 +92,7 @@ public sealed partial class NPCSteeringSystem // This is to avoid popping it too early 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? // TODO: Consider melee range or the likes. -- 2.51.2