]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix NPC arrival distance for nodes (#15193)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Fri, 7 Apr 2023 10:54:20 +0000 (20:54 +1000)
committerGitHub <noreply@github.com>
Fri, 7 Apr 2023 10:54:20 +0000 (20:54 +1000)
Content.Server/NPC/Systems/NPCSteeringSystem.Context.cs

index 65c4315cf35d7772fddc354fcdb1d7fb0a7acb07..df7e13e65d5cad57a389aae6d0afc0724a26f5f0 100644 (file)
@@ -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.