From b269fa382569095b095718b3fc64b2f1ec7023f7 Mon Sep 17 00:00:00 2001 From: bash Date: Sun, 31 May 2026 13:55:31 +0200 Subject: [PATCH] fix(Core/Movement): MoveFarTo re-caches lastPath after UpcommingSpecialMovement (matches reference) --- src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp index 8db31012b..e3e507c72 100644 --- a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp +++ b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp @@ -129,6 +129,13 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest) if (onTransport) return false; + // Re-cache the (potentially cut) path so next tick's 10% reuse and + // WaitForTransport gates see the latest shape. Reference does this + // at the same point in MoveTo2 (after UpcommingSpecialMovement + // examined / trimmed the path, before ClipPath / dispatch). + if (!path.empty()) + lastMove.setPath(path); + // ClipPath — truncate at first hostile creature in range / non-walkable // hop / drifted past reactDistance / > 125 sqDist jump. path.ClipPath(botAI, bot, false);