From 648ceebbffc5532f2f241c9944edc4d6d645b71f Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Fri, 3 Jul 2020 13:52:15 -0500 Subject: [PATCH] client cleanups part 1) order of operations on disconnectedCleanup --- .../core/clientServer/scripts/client/connectionToServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/BaseGame/game/core/clientServer/scripts/client/connectionToServer.cs b/Templates/BaseGame/game/core/clientServer/scripts/client/connectionToServer.cs index 63c263f45..728d3dace 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/client/connectionToServer.cs +++ b/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(); }