From 64db341662f78ab026e90412077a5cceeb0c1ceb Mon Sep 17 00:00:00 2001 From: MrGadget1024 Date: Tue, 19 Oct 2021 21:54:28 -0400 Subject: [PATCH] Revert "Call OnClientSceneChanged for host client" This reverts commit 6f5c6514935dbd93a8529fd89a41d486b5adfbec. --- Assets/Mirror/Runtime/NetworkManager.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkManager.cs b/Assets/Mirror/Runtime/NetworkManager.cs index 3eaa85f3d..7a8defcf5 100644 --- a/Assets/Mirror/Runtime/NetworkManager.cs +++ b/Assets/Mirror/Runtime/NetworkManager.cs @@ -811,13 +811,10 @@ internal void ClientChangeScene(string newSceneName, SceneOperation sceneOperati OnClientChangeScene(newSceneName, sceneOperation, customHandling); // 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. - // Host client still needs OnClientSceneChanged called because it's virtual and may be overridden. + // the actual scene change, and we don't need to do it for the host client if (NetworkServer.active) - { - OnClientSceneChanged(NetworkClient.connection); return; - } + // set client flag to stop processing messages while loading scenes. // otherwise we would process messages and then lose all the state // as soon as the load is finishing, causing all kinds of bugs