Fix ground graph re-entry and flight presentation

Bound expanded ground access probes and recover failed graph entry with checked walking searches. Unify airborne idle animation, observer updates and post-dismount movement cleanup for normal and emergency landings.

Add native registered-testbot flight controls, regression coverage and live reproduction fixtures. Record raid test setup and bound passive debugger variable printing after the observed diagnostic OOM.
This commit is contained in:
Nico committed 2026-11-05 18:53:23 +01:00
1 parent a211580262
commit f7a5899dc0
25 files changed
+988 -60

No files matched your search

@@ -657,14 +657,24 @@ bool ClientlessTravelGraphMgr::PlanAdaptiveRoute(
std::map<ClientlessGraphProbeCache::Key,ClientlessPathDiagnostics> startProbes;
std::map<std::pair<ClientlessGraphProbeCache::Key, bool>, float> flightEstimates;
std::uint64_t expandedStartFlightCalls=0;
auto analyzeStart=[&](Position const& target,ClientlessPathDiagnostics& result)
uint32 expandedGroundCalls = 0;
std::uint64_t expandedGroundUs = 0;
auto analyzeStart=[&](Position const& target,ClientlessPathDiagnostics& result,
bool expandedGround = false) -> bool
{
auto key=ClientlessGraphProbeCache::MakeKey(player->GetMapId(),player->GetInstanceId(),player->GetPositionX(),player->GetPositionY(),player->GetPositionZ(),target.GetPositionX(),target.GetPositionY(),target.GetPositionZ());
auto found=startProbes.find(key);if(found!=startProbes.end()){result=found->second;return;}
auto found=startProbes.find(key);if(found!=startProbes.end()){result=found->second;return true;}
// Stop adding speculative MMAP work after four calls or 25 ms. One
// native call cannot be interrupted; cached tier-two probes remain free.
if (expandedGround && (expandedGroundCalls >= 4 || expandedGroundUs >= 25000))
return false;
auto begin=std::chrono::steady_clock::now();++trace.StartCalls;
sClientlessTravelMgr->AnalyzePath(const_cast<Player*>(player),target,result);
trace.StartUs+=std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now()-begin).count();
auto const elapsed = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now()-begin).count();
trace.StartUs += elapsed;
if (expandedGround) { ++expandedGroundCalls; expandedGroundUs += elapsed; }
startProbes.emplace(key,result);
return true;
};
sClientlessFlightMgr->BeginPlanning(player);
struct FlightPlanningScope
@@ -904,11 +914,15 @@ bool ClientlessTravelGraphMgr::PlanAdaptiveRoute(
Position entryTarget;
entryTarget.Relocate(node.X, node.Y, node.Z, node.O);
ClientlessPathDiagnostics entryNav;
bool const groundCandidate=localDistance<=startRadius;
if(groundCandidate)analyzeStart(entryTarget,entryNav);
// Long access walks use native MMAP paths, executed in the usual
// short splines. Bound expensive speculative probes per search tier.
bool const groundCandidate = (localDistance <= startRadius || expanded) &&
analyzeStart(entryTarget, entryNav, localDistance > 500.0f);
if (!groundCandidate && !flightEnabled)
continue;
bool const reachable = groundCandidate && entryNav.Calculated && entryNav.Complete &&
entryNav.FinalDistance <= 1.5f && entryNav.MaxSegmentLength <= 8.0f &&
entryNav.MaxZDelta <= 5.0f && entryNav.PathLength <= 500.0f;
entryNav.MaxZDelta <= 5.0f && entryNav.PathLength <= 2000.0f;
ClientlessTravelNode departure;
departure.Key="flight_departure";
departure.MapId=player->GetMapId();departure.X=player->GetPositionX();departure.Y=player->GetPositionY();departure.Z=player->GetPositionZ();
@@ -933,7 +947,7 @@ bool ClientlessTravelGraphMgr::PlanAdaptiveRoute(
(entryNav.PathType & uint32(PATHFIND_INCOMPLETE)) != 0 &&
(entryNav.PathType & uint32(PATHFIND_NOPATH)) == 0 &&
entryNav.PointCount >= 2 && entryNav.PathLength >= 2.0f &&
entryNav.PathLength <= 500.0f && entryNav.MaxSegmentLength <= 8.0f &&
entryNav.PathLength <= 2000.0f && entryNav.MaxSegmentLength <= 8.0f &&
entryNav.MaxZDelta <= 5.0f &&
entryNav.FinalDistance + 1.0f < entryNav.DirectDistance;
if (!reachable && !(allowDeferred && partial))
@@ -1090,9 +1104,9 @@ bool ClientlessTravelGraphMgr::PlanAdaptiveRoute(
"VIRTUAL_EDGE_CANDIDATES map=%u tested=%u accepted=%u",
player->GetMapId(), validated, accepted);
// Keep nearby recorded ground entries ahead of long flight-only entries.
// A ground-only bot never widens its local navigation limit.
if(!startCount && !accepted && flightEnabled)
// Keep nearby recorded ground entries ahead of expanded access walks/flights.
// Ground-only bots also search successive 500-yard rings up to 10,000 yards.
if(!startCount && !accepted)
{
for(float inner=startRadius;inner<10000.0f && !startCount;)
{