From 7a9d5cd73d2c8e69e3321572e937382dde365ffc Mon Sep 17 00:00:00 2001 From: bash Date: Mon, 18 May 2026 01:22:02 +0200 Subject: [PATCH] fix(Core/Travel): Reject paths with >75y final-segment teleport jumps --- src/Mgr/Travel/TravelNode.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Mgr/Travel/TravelNode.cpp b/src/Mgr/Travel/TravelNode.cpp index 0bd730c89..8d82d56af 100644 --- a/src/Mgr/Travel/TravelNode.cpp +++ b/src/Mgr/Travel/TravelNode.cpp @@ -232,6 +232,13 @@ TravelNodePath* TravelNode::BuildPath(TravelNode* endNode, Unit* bot, bool postP if (canPath && path.size() == 2 && getPosition()->distance(endNode->getPosition()) > 5.0f) canPath = false; + // Reject long final segments. If the last waypoint is >75y from + // the second-to-last, the chained probe stalled mid-route and + // mmap "teleported" to the destination as the final waypoint — + // the bot would air-walk that jump. Path is not a valid route. + if (canPath && path.size() >= 2 && path[path.size() - 2].distance(&path.back()) > 75.0f) + canPath = false; + // Reject too-short or too-steep results — geometry shortcut that // mmap returns but a player can't actually walk. if (canPath && TravelPath::IsPathCheating(path, getPosition()->distance(endNode->getPosition())))