Revert "Call OnClientSceneChanged for host client"

This reverts commit 6f5c651493.
This commit is contained in:
MrGadget1024 2021-10-19 21:54:28 -04:00
parent 6f5c651493
commit 64db341662

View File

@ -811,13 +811,10 @@ internal void ClientChangeScene(string newSceneName, SceneOperation sceneOperati
OnClientChangeScene(newSceneName, sceneOperation, customHandling); OnClientChangeScene(newSceneName, sceneOperation, customHandling);
// After calling OnClientChangeScene, exit if server since server is already doing // After calling OnClientChangeScene, exit if server since server is already doing
// the actual scene change, and we don't need to do it for the host client. // the actual scene change, and we don't need to do it for the host client
// Host client still needs OnClientSceneChanged called because it's virtual and may be overridden.
if (NetworkServer.active) if (NetworkServer.active)
{
OnClientSceneChanged(NetworkClient.connection);
return; return;
}
// set client flag to stop processing messages while loading scenes. // set client flag to stop processing messages while loading scenes.
// otherwise we would process messages and then lose all the state // otherwise we would process messages and then lose all the state
// as soon as the load is finishing, causing all kinds of bugs // as soon as the load is finishing, causing all kinds of bugs