瀏覽代碼

Merge pull request #236 from Azaezel/alpha40_connectionCleanup

client cleanups
Brian Roberts 5 年之前
父節點
當前提交
70ea856574
共有 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.
    // 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();
 }
 }