From f0918c66b03872cba7cd9802902084ded8ad1249 Mon Sep 17 00:00:00 2001 From: arcattack Date: Wed, 22 Jul 2026 08:40:55 -0500 Subject: [PATCH] Join wait: animate through EVERY pre-mission state Two follow-ups to the waiting-screen work, both user-reported: 1. "Animation frozen after connecting": once the console seats the player and sends the egg, the state advances LoadingMission -> WaitingForLaunch -- where NOTHING presents until the operator's RunMission, so the last idle frame froze on screen with the mission audio already running. ExecuteForeground now keeps the idle clear + overlay alive through LoadingMission/WaitingForLaunch/LaunchingMission (no early return -- the load/replication work continues), and ExecuteIdle picks per-state text: WaitingForEgg "WAITING FOR MISSION ASSIGNMENT" Loading/Launching "LOADING MISSION / stand by" WaitingForLaunch "MISSION READY / waiting for the operator to launch" 2. The roster-full retry pause was a raw Sleep(3000) -- with the relay up and answering SEAT_FULL instantly, the process spent ~95% of its time unpumped (IsHungAppWindow TRUE, spinner frozen). Now 30 pumped 100ms slices with the reason on screen ("session is FULL -- waiting for a seat to free up"). Verified live against the running operator relay: roster-full wait shows the reason text, spinner advances across 500ms captures, IsHungAppWindow false on every sample. Co-Authored-By: Claude Opus 4.8 (1M context) --- engine/MUNGA/APP.cpp | 15 +++++++++++++++ engine/MUNGA_L4/L4NET.CPP | 13 ++++++++++++- engine/MUNGA_L4/L4VIDEO.cpp | 17 +++++++++++++++-- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/engine/MUNGA/APP.cpp b/engine/MUNGA/APP.cpp index 58459d3..e0261f0 100644 --- a/engine/MUNGA/APP.cpp +++ b/engine/MUNGA/APP.cpp @@ -548,6 +548,21 @@ Time endControls = Now(); CLEAR_FOREGROUND_PROCESSING(); return executeFrames; } + // + // PRE-RUN WAIT STATES (2026-07-22, "animation frozen after connecting"): + // after the egg arrives the state advances LoadingMission -> + // WaitingForLaunch, where NOTHING presents until the operator's + // RunMission -- the last idle frame froze on screen (with the mission + // audio already running). Keep the idle clear + waiting overlay alive + // through these states; NO early return -- the load steps / replication + // / network below must keep running. ExecuteIdle picks per-state text. + // + if (GetApplicationState() == LoadingMission + || GetApplicationState() == WaitingForLaunch + || GetApplicationState() == LaunchingMission) + { + videoRenderer->ExecuteIdle(); + } // //-------------------------------------------------------------------------- diff --git a/engine/MUNGA_L4/L4NET.CPP b/engine/MUNGA_L4/L4NET.CPP index 00384f8..f0ad657 100644 --- a/engine/MUNGA_L4/L4NET.CPP +++ b/engine/MUNGA_L4/L4NET.CPP @@ -1650,7 +1650,18 @@ Logical L4NetworkManager::RelayRequestSeat() full_shown = 1; banner_shown = 1; // suppress the banner after this } - Sleep(3000); + { + // pumped retry pause (the raw Sleep(3000) froze the window + + // spinner whenever the relay answered -- e.g. ROSTER FULL) + const char *why = roster_full + ? "session is FULL -- waiting for a seat to free up" + : "retrying..."; + for (int slice = 0; slice < 30; ++slice) // 3s + { + RelayWaitTick("WAITING FOR THE OPERATOR'S SESSION", why); + Sleep(100); + } + } } return False; } diff --git a/engine/MUNGA_L4/L4VIDEO.cpp b/engine/MUNGA_L4/L4VIDEO.cpp index 914b0ce..3a7a05a 100644 --- a/engine/MUNGA_L4/L4VIDEO.cpp +++ b/engine/MUNGA_L4/L4VIDEO.cpp @@ -8846,8 +8846,21 @@ void DPLRenderer::ExecuteIdle() // repainted after every Present; join/join_lan UX fix 2026-07-22). { HRESULT present_hr = mDevice->Present(NULL, NULL, NULL, NULL); - BTWaitScreenPaint("WAITING FOR MISSION ASSIGNMENT", - "the operator starts the session from the console"); + const char *wait_line1 = "WAITING FOR MISSION ASSIGNMENT"; + const char *wait_line2 = "the operator starts the session from the console"; + switch (application ? application->GetApplicationState() : -1) + { + case Application::LoadingMission: + case Application::LaunchingMission: + wait_line1 = "LOADING MISSION"; + wait_line2 = "stand by"; + break; + case Application::WaitingForLaunch: + wait_line1 = "MISSION READY"; + wait_line2 = "waiting for the operator to launch"; + break; + } + BTWaitScreenPaint(wait_line1, wait_line2); if (present_hr == D3DERR_DEVICELOST) { int bbCount = mPresentParams.BackBufferCount;