From 999c5343faad9aacb6f3dbd8374acc5babf0b288 Mon Sep 17 00:00:00 2001 From: bash Date: Sat, 9 May 2026 14:15:21 +0200 Subject: [PATCH] Revert "fix(Core/Travel): Drop short-distance short-circuit in GetFullPath" This reverts commit 71dcd6ff09c4cb1975500e3ce5877dbb6018ca91. --- src/Mgr/Travel/TravelNode.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/Mgr/Travel/TravelNode.cpp b/src/Mgr/Travel/TravelNode.cpp index 5ca6a5304..df77344ac 100644 --- a/src/Mgr/Travel/TravelNode.cpp +++ b/src/Mgr/Travel/TravelNode.cpp @@ -1290,18 +1290,14 @@ bool TravelNodeMap::GetFullPath(TravelPlan& plan, plan.Reset(); plan.destination = destination; - // Removed the "short distance — direct walk" short-circuit that - // returned a 2-point plan [botPos, destination] without any - // navmesh validation. NODE_PREPATH dispatch then MoveTo'd the - // destination as a single straight-line spline, which clipped - // through walls/mountains whenever bot and dest sat on opposite - // sides of geometry within 296y. - // - // Falling through to the graph build here means: if a graph - // route exists, use it (now validated by IsPathCheating in - // BuildPath + RefineWalkPoints at runtime); otherwise return - // false so MoveFarTo falls through to its chained mmap probe, - // which resolves an mmap-clean waypoint chain. + // Short distance — direct walk, no nodes needed + if (botPos.fDist(destination) < MAX_PATHFINDING_DISTANCE && + botPos.GetMapId() == destination.GetMapId()) + { + plan.steps.addPoint(botPos, PathNodeType::NODE_PREPATH); + plan.steps.addPoint(destination, PathNodeType::NODE_PATH); + return true; + } std::shared_lock guard(m_nMapMtx);