Revert "fix(Core/Travel): Drop short-distance short-circuit in GetFullPath"

This reverts commit 71dcd6ff09c4cb1975500e3ce5877dbb6018ca91.
This commit is contained in:
bash 2026-05-09 14:15:21 +02:00
parent 71dcd6ff09
commit f58bcf3fd4

View File

@ -1290,18 +1290,14 @@ bool TravelNodeMap::GetFullPath(TravelPlan& plan,
plan.Reset(); plan.Reset();
plan.destination = destination; plan.destination = destination;
// Removed the "short distance — direct walk" short-circuit that // Short distance — direct walk, no nodes needed
// returned a 2-point plan [botPos, destination] without any if (botPos.fDist(destination) < MAX_PATHFINDING_DISTANCE &&
// navmesh validation. NODE_PREPATH dispatch then MoveTo'd the botPos.GetMapId() == destination.GetMapId())
// destination as a single straight-line spline, which clipped {
// through walls/mountains whenever bot and dest sat on opposite plan.steps.addPoint(botPos, PathNodeType::NODE_PREPATH);
// sides of geometry within 296y. plan.steps.addPoint(destination, PathNodeType::NODE_PATH);
// return true;
// 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.
std::shared_lock<std::shared_timed_mutex> guard(m_nMapMtx); std::shared_lock<std::shared_timed_mutex> guard(m_nMapMtx);