client cleanups

part 1) order of operations on disconnectedCleanup
This commit is contained in:
AzaezelX 2020-07-03 13:52:15 -05:00
parent 005f7f6fd2
commit 648ceebbff

View file

@ -104,12 +104,12 @@ function disconnect()
// else physics resources will not cleanup properly.
physicsStopSimulation( "client" );
disconnectedCleanup();
// Delete the connection if it's still there.
if (isObject(ServerConnection))
ServerConnection.delete();
disconnectedCleanup();
// Call destroyServer in case we're hosting
destroyServer();
}