From 347cb5374d0cba72762e893645f076d3161aa0c5 Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 24 Mar 2020 22:28:04 +0100 Subject: [PATCH] fix: #1593 - NetworkRoomManager.ServerChangeScene doesn't destroy the world player before replacing the connection. otherwise ReplacePlayerForConnection removes authority form a destroyed object, causing all kidns of errors. The call wasn't actually needed. (#1594) * fix: #1593 - NetworkRoomManager.ServerChangeScene destroys the world player after replacing the connection, not before. previously ReplacePlayerForConnection would operate on dead data. * remove it entirely --- Assets/Mirror/Components/NetworkRoomManager.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Assets/Mirror/Components/NetworkRoomManager.cs b/Assets/Mirror/Components/NetworkRoomManager.cs index 893bdecd9..a0284b654 100644 --- a/Assets/Mirror/Components/NetworkRoomManager.cs +++ b/Assets/Mirror/Components/NetworkRoomManager.cs @@ -324,7 +324,6 @@ public override void ServerChangeScene(string newSceneName) NetworkIdentity identity = roomPlayer.GetComponent(); NetworkIdentity playerController = identity.connectionToClient.identity; - NetworkServer.Destroy(playerController.gameObject); if (NetworkServer.active) {