瀏覽代碼

client cleanups
part 1) order of operations on disconnectedCleanup

AzaezelX 5 年之前
父節點
當前提交
648ceebbff
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Templates/BaseGame/game/core/clientServer/scripts/client/connectionToServer.cs

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

@@ -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();
 }