Fix bootstrap config window race after map entry#934
Open
MhaWay wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Testing
dotnet build .\Source\Client\Multiplayer.csproj -c Release