Skip to content

Fix bootstrap config window race after map entry#934

Open
MhaWay wants to merge 1 commit into
rwmt:devfrom
MhaWay:fix/bootstrap-config-window-rearm-race
Open

Fix bootstrap config window race after map entry#934
MhaWay wants to merge 1 commit into
rwmt:devfrom
MhaWay:fix/bootstrap-config-window-rearm-race

Conversation

@MhaWay
Copy link
Copy Markdown
Contributor

@MhaWay MhaWay commented May 21, 2026

Problem

During server bootstrap, after entering the generated map the Server Bootstrap Configuration window could reappear too early. In practice it could show before, or on top of, the scenario/game-start dialog instead of waiting until that dialog had been acknowledged.

Cause

The bootstrap flow could re-show the config window immediately after map initialization, while the scenario dialog was still being opened or was still active. At the same time, the bootstrap-map-init arm path could still run during the post-init waiting phase.

Fix

  • add a short dedicated post-map delay before re-showing the bootstrap waiting window
  • stop showing the bootstrap window immediately from OnBootstrapMapInitialized
  • only show it when there are no blocking dialogs on the stack, including Dialog_MessageBox and Dialog_NodeTree
  • avoid re-arming the bootstrap-map-init wait while already in the post-init waiting phase
  • reset the new transient window-delay state together with the rest of the bootstrap transient state

Testing

  • reproduced the issue during bootstrap map creation
  • built the client with dotnet build .\Source\Client\Multiplayer.csproj -c Release
  • verified in game that the scenario dialog appears first and the bootstrap waiting window only appears after dismissing it
  • completed the bootstrap flow through save upload and server shutdown

Copilot AI review requested due to automatic review settings May 21, 2026 18:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a UI race in the client bootstrap flow where the Server Bootstrap Configuration window could reappear immediately after entering the generated map, potentially overlapping the scenario/game-start dialog. The changes make re-showing the bootstrap window more deliberate by adding a short post-map delay and gating the re-show on the absence of blocking dialogs, while also preventing the bootstrap-map-init wait from being re-armed during the post-init waiting phase.

Changes:

  • Add a short post-map-enter window delay before re-showing the bootstrap configurator window.
  • Prevent re-showing the bootstrap window directly from OnBootstrapMapInitialized, and instead re-show only when no blocking dialogs (MessageBox/NodeTree) are present.
  • Avoid re-arming the bootstrap map-init wait while already in the post-init waiting phase, and reset the new delay state with other transient UI state.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Source/Client/Windows/BootstrapConfiguratorWindow.cs Resets newly added post-map window delay as part of transient UI state reset.
Source/Client/Windows/BootstrapConfiguratorWindow.BootstrapFlow.cs Introduces post-map window delay, refines window re-show conditions to avoid dialog overlap, and prevents re-arming map-init wait during post-init delay.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +205 to +210
if (postMapEnterWindowDelayRemaining > 0f || postMapEnterSaveDelayRemaining > 0f || awaitingControllablePawns)
{
postMapEnterWindowDelayRemaining -= Time.deltaTime;
if (postMapEnterWindowDelayRemaining <= 0f)
TryShowBootstrapWindow();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants