Browse Source

client cleanups
part 1) order of operations on disconnectedCleanup

AzaezelX 5 years ago
parent
commit
648ceebbff

+ 2 - 2
Templates/BaseGame/game/core/clientServer/scripts/client/connectionToServer.cs

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