mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/Travel): Drop short-distance short-circuit in GetFullPath
This commit is contained in:
parent
49be0f279a
commit
71dcd6ff09
@ -1290,14 +1290,18 @@ bool TravelNodeMap::GetFullPath(TravelPlan& plan,
|
|||||||
plan.Reset();
|
plan.Reset();
|
||||||
plan.destination = destination;
|
plan.destination = destination;
|
||||||
|
|
||||||
// Short distance — direct walk, no nodes needed
|
// Removed the "short distance — direct walk" short-circuit that
|
||||||
if (botPos.fDist(destination) < MAX_PATHFINDING_DISTANCE &&
|
// returned a 2-point plan [botPos, destination] without any
|
||||||
botPos.GetMapId() == destination.GetMapId())
|
// navmesh validation. NODE_PREPATH dispatch then MoveTo'd the
|
||||||
{
|
// destination as a single straight-line spline, which clipped
|
||||||
plan.steps.addPoint(botPos, PathNodeType::NODE_PREPATH);
|
// through walls/mountains whenever bot and dest sat on opposite
|
||||||
plan.steps.addPoint(destination, PathNodeType::NODE_PATH);
|
// sides of geometry within 296y.
|
||||||
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);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user