From 26ea1b60fc740f79d840b323d98373390daa3955 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Sat, 9 Aug 2025 19:54:51 -0500 Subject: [PATCH] ensure controlling client object is removed post onClienLeaveGame so each controllable object module doesn't have to remmber to do so --- .../clientServer/scripts/server/connectionToClient.tscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Templates/BaseGame/game/core/clientServer/scripts/server/connectionToClient.tscript b/Templates/BaseGame/game/core/clientServer/scripts/server/connectionToClient.tscript index e2661492d..ac475f3c8 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/server/connectionToClient.tscript +++ b/Templates/BaseGame/game/core/clientServer/scripts/server/connectionToClient.tscript @@ -363,6 +363,9 @@ function GameConnection::onDrop(%this, %reason) if($missionRunning) { %hasGameMode = callGamemodeFunction("onClientLeaveGame", %this); + // Cleanup the player + if (isObject(%client.player)) + %client.player.delete(); } removeFromServerGuidList( %this.guid );