feat(Core/Movement): Add LastMovement::lastTransportEntry for transport-resume gate

This commit is contained in:
bash 2026-05-30 22:05:06 +02:00
parent d26ac742bb
commit c55f554bb4
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,7 @@ LastMovement::LastMovement(LastMovement& other)
nextTeleport = other.nextTeleport; nextTeleport = other.nextTeleport;
lastPath = other.lastPath; lastPath = other.lastPath;
priority = other.priority; priority = other.priority;
lastTransportEntry = other.lastTransportEntry;
} }
void LastMovement::clear() void LastMovement::clear()
@ -42,6 +43,7 @@ void LastMovement::clear()
msTime = 0; msTime = 0;
lastdelayTime = 0; lastdelayTime = 0;
priority = MovementPriority::MOVEMENT_NORMAL; priority = MovementPriority::MOVEMENT_NORMAL;
lastTransportEntry = 0;
} }
void LastMovement::Set(Unit* follow) void LastMovement::Set(Unit* follow)

View File

@ -39,6 +39,7 @@ public:
lastPath = other.lastPath; lastPath = other.lastPath;
nextTeleport = other.nextTeleport; nextTeleport = other.nextTeleport;
priority = other.priority; priority = other.priority;
lastTransportEntry = other.lastTransportEntry;
return *this; return *this;
}; };
@ -66,6 +67,10 @@ public:
MovementPriority priority; MovementPriority priority;
TravelPath lastPath; TravelPath lastPath;
time_t nextTeleport; 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<TravelPath> future; std::future<TravelPath> future;
}; };