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
This commit is contained in:
vis2k 2020-03-24 22:28:04 +01:00 committed by GitHub
parent 9a50fbd507
commit 347cb5374d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -324,7 +324,6 @@ public override void ServerChangeScene(string newSceneName)
NetworkIdentity identity = roomPlayer.GetComponent<NetworkIdentity>(); NetworkIdentity identity = roomPlayer.GetComponent<NetworkIdentity>();
NetworkIdentity playerController = identity.connectionToClient.identity; NetworkIdentity playerController = identity.connectionToClient.identity;
NetworkServer.Destroy(playerController.gameObject);
if (NetworkServer.active) if (NetworkServer.active)
{ {