Skip to content

Fix standalone join-point creation on join#945

Merged
notfood merged 2 commits into
rwmt:devfrom
MhaWay:fix/standalone-join-on-login-design-dev
Jun 5, 2026
Merged

Fix standalone join-point creation on join#945
notfood merged 2 commits into
rwmt:devfrom
MhaWay:fix/standalone-join-on-login-design-dev

Conversation

@MhaWay
Copy link
Copy Markdown
Contributor

@MhaWay MhaWay commented Jun 4, 2026

Summary

Fix a dedicated standalone regression where subsequent players could fail to join after the first player entered the world.

On standalone servers, joining clients should consume the persisted world state directly. Fresh join-points should be created later by players already in-game during save or refresh flows, not during the initial server join path.

Changes

  • stop creating join-points during standalone server join
  • centralize the join-time decision in ServerJoiningState.ShouldCreateJoinPointOnJoin
  • add regression coverage for standalone joins when another player is already active

Validation

  • dotnet test .\\Source\\Tests\\Tests.csproj -c Release --filter "FullyQualifiedName~StandaloneMapStreamingTest"

Result:

  • 10 tests passed

Copilot AI review requested due to automatic review settings June 4, 2026 19:16
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

Note

Copilot was unable to run its full agentic suite in this review.

Refactors join-point creation logic during server join, and adds regression tests to enforce that standalone joins do not trigger join-point creation.

Changes:

  • Extracted join-point creation decision into ServerJoiningState.ShouldCreateJoinPointOnJoin.
  • Changed standalone join behavior to never create a join point on join.
  • Added tests covering standalone join scenarios where a join point should not be created.

Reviewed changes

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

File Description
Source/Tests/StandaloneMapStreamingTest.cs Adds tests asserting standalone joins don’t create join points under specific conditions.
Source/Common/Networking/State/ServerJoiningState.cs Centralizes join-point creation decision and changes standalone behavior to always skip join-point creation.

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

Comment on lines +43 to +51
public static bool ShouldCreateJoinPointOnJoin(MultiplayerServer server)
{
// Standalone joins always consume the persisted world state. Fresh join points are created
// by players already inside the game during save/refresh flows, not by the entering client.
if (server.IsStandaloneServer)
return false;

return server.settings.autoJoinPoint.HasFlag(AutoJoinPointFlags.Join);
}
Comment on lines +152 to +160
[Test]
public void StandaloneJoin_DoesNotCreateJoinPoint_WhenStreamingIsEnabled()
{
server.settings.multifaction = true;
server.settings.asyncTime = true;
AddPlayer("existing", 1);

Assert.That(ServerJoiningState.ShouldCreateJoinPointOnJoin(server), Is.False);
}
if (server.IsStandaloneServer)
return false;

return server.settings.autoJoinPoint.HasFlag(AutoJoinPointFlags.Join);
// For the normal first join, serve the persisted state immediately instead of blocking on WaitJoinPoint.
if ((Server.IsStandaloneServer && Server.PlayingPlayers.Any()) ||
(!Server.IsStandaloneServer && Server.settings.autoJoinPoint.HasFlag(AutoJoinPointFlags.Join)))
if (ShouldCreateJoinPointOnJoin(Server))
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.

This doesn't need a new method. Change it to:

!server.IsStandaloneServer && server.settings.autoJoinPoint.HasFlag(AutoJoinPointFlags.Join)

@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 Jun 5, 2026
@notfood notfood moved this to In review in 1.6 and Odyssey Jun 5, 2026
@notfood notfood merged commit 39e4f87 into rwmt:dev Jun 5, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In review to Done in 1.6 and Odyssey Jun 5, 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.

3 participants