Skip to content

Commit

Permalink
fix: host wasnt loading with additive fix
Browse files Browse the repository at this point in the history
  • Loading branch information
uweeby committed Oct 29, 2020
1 parent d0d5581 commit cd6110a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Assets/Mirror/Runtime/NetworkSceneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,15 @@ internal void ClientSceneMessage(INetworkConnection conn, SceneMessage msg)
// Let client prepare for scene change
OnClientChangeScene(msg.scenePath, msg.sceneOperation);

//Dont allow local client to change the scene after the host server already did
if(!client.IsLocalClient)
//if host mode and scene change is additive
if (client.IsLocalClient && msg.sceneOperation != SceneOperation.Normal)
{
FinishLoadScene(msg.scenePath, msg.sceneOperation);
}
else
{
StartCoroutine(ApplySceneOperation(msg.scenePath, msg.sceneOperation));
}
}

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

0 comments on commit cd6110a

Please sign in to comment.