From c55f554bb442f11a2bc88133cbda1d746961c291 Mon Sep 17 00:00:00 2001 From: bash Date: Sat, 30 May 2026 22:05:06 +0200 Subject: [PATCH] feat(Core/Movement): Add LastMovement::lastTransportEntry for transport-resume gate --- src/Ai/Base/Value/LastMovementValue.cpp | 2 ++ src/Ai/Base/Value/LastMovementValue.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/Ai/Base/Value/LastMovementValue.cpp b/src/Ai/Base/Value/LastMovementValue.cpp index 22c35450d..b0766fdb9 100644 --- a/src/Ai/Base/Value/LastMovementValue.cpp +++ b/src/Ai/Base/Value/LastMovementValue.cpp @@ -24,6 +24,7 @@ LastMovement::LastMovement(LastMovement& other) nextTeleport = other.nextTeleport; lastPath = other.lastPath; priority = other.priority; + lastTransportEntry = other.lastTransportEntry; } void LastMovement::clear() @@ -42,6 +43,7 @@ void LastMovement::clear() msTime = 0; lastdelayTime = 0; priority = MovementPriority::MOVEMENT_NORMAL; + lastTransportEntry = 0; } void LastMovement::Set(Unit* follow) diff --git a/src/Ai/Base/Value/LastMovementValue.h b/src/Ai/Base/Value/LastMovementValue.h index ef09d31fe..15b6e8502 100644 --- a/src/Ai/Base/Value/LastMovementValue.h +++ b/src/Ai/Base/Value/LastMovementValue.h @@ -39,6 +39,7 @@ public: lastPath = other.lastPath; nextTeleport = other.nextTeleport; priority = other.priority; + lastTransportEntry = other.lastTransportEntry; return *this; }; @@ -66,6 +67,10 @@ public: MovementPriority priority; TravelPath lastPath; time_t nextTeleport; + // Entry of the transport the bot is currently aboard mid-journey, + // used by WaitForTransport to resume a transport segment if the + // bot is still on it next tick (e.g. boat in motion). 0 = none. + uint32 lastTransportEntry{0}; std::future future; };