Skip to content

fix map rotation during server bootstrap bootstrap#933

Merged
notfood merged 1 commit into
rwmt:devfrom
MhaWay:fix-bootstrap-connecting-window-clean
May 20, 2026
Merged

fix map rotation during server bootstrap bootstrap#933
notfood merged 1 commit into
rwmt:devfrom
MhaWay:fix-bootstrap-connecting-window-clean

Conversation

@MhaWay
Copy link
Copy Markdown
Contributor

@MhaWay MhaWay commented May 20, 2026

Summary

Close any active connecting windows when the join flow switches into standalone bootstrap mode, and suppress their normal PostClose side effects so the bootstrap transition does not stop multiplayer or reopen the server browser.

This fixes the blocked world map rotation during standalone server bootstrap. The root cause was a stale connecting window remaining in the window stack and continuing to prevent camera motion, which left the globe stuck during starting-site selection.

Testing

  • dotnet build .\Source\Client\Multiplayer.csproj -c Release
  • dotnet build .\Source\Server\Server.csproj -c Release
  • Tested bootstrap flow in game from a clean dev worktree
  • Verified normal join flow still works

Copilot AI review requested due to automatic review settings May 20, 2026 17:11
@notfood notfood added fix Fixes for a bug or desync. 1.6 Fixes or bugs relating to 1.6 (Not Odyssey). standalone server Fix or bugs relating to the standalone server. labels May 20, 2026
@notfood notfood moved this to In review in 1.6 and Odyssey May 20, 2026
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 adjusts the client join → standalone bootstrap transition so that any active “connecting” dialogs are closed without triggering their normal PostClose side effects (which would otherwise stop multiplayer or reopen the server browser).

Changes:

  • Added a suppressPostCloseActions flag to BaseConnectingWindow to optionally bypass PostClose teardown behavior.
  • When switching into ClientBootstrap, enumerates and removes any BaseConnectingWindow instances while suppressing their PostClose actions, then opens BootstrapConfiguratorWindow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Source/Client/Windows/ConnectingWindow.cs Adds a suppression flag to prevent PostClose from stopping multiplayer / reopening server browser during controlled shutdown.
Source/Client/Networking/State/ClientJoiningState.cs Removes active connecting windows (with suppression enabled) before entering bootstrap state and showing the bootstrap configurator UI.

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

Comment on lines +121 to 124
if (suppressPostCloseActions)
return;

Multiplayer.StopMultiplayer();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now I'm a bit confused how does this work when joining a non-bootstrap game. When loading the world, and Find.WindowStack is switched out, is the PostClose method not called?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It’s exactly why the problem only exists in the bootstrap path.

In a normal non-bootstrap join, the client proceeds into the regular loading flow and then switches over to the loaded game UI. In that process, the old connecting window is not being explicitly closed as part of the same window stack lifecycle, so its close callback is not what makes it disappear. It effectively vanishes together with the old UI state during the transition into the loaded game.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bootstrap behaves differently because there is no immediate transition into the loaded game UI. We stay on the same window stack and open the bootstrap flow on top of it. That means the old connecting window can remain alive and continue blocking camera motion, which is why the globe gets stuck only there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't know if is possible to move all in a dedicated window stack or something like this to fix it in another way but i think too much work for a simple bootstrap config

@notfood notfood merged commit 823146d into rwmt:dev May 20, 2026
4 of 5 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in 1.6 and Odyssey May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6 Fixes or bugs relating to 1.6 (Not Odyssey). fix Fixes for a bug or desync. standalone server Fix or bugs relating to the standalone server.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants