Skip to content

Commit

Permalink
fix: local client loading additive scene twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
uweeby committed Oct 26, 2020
1 parent e9664e0 commit 5a74fb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Assets/Mirror/Runtime/NetworkSceneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ internal void ClientSceneMessage(INetworkConnection conn, SceneMessage msg)
// Let client prepare for scene change
OnClientChangeScene(msg.scenePath, msg.sceneOperation);

StartCoroutine(ApplySceneOperation(msg.scenePath, msg.sceneOperation));
//Dont allow local client to change the scene after the host server already did
if(!client.IsLocalClient)
StartCoroutine(ApplySceneOperation(msg.scenePath, msg.sceneOperation));
}

internal void ClientSceneReadyMessage(INetworkConnection conn, SceneReadyMessage msg)
Expand Down

0 comments on commit 5a74fb0

Please sign in to comment.