Forráskód Böngészése

ensure controlling client object is removed post onClienLeaveGame so each controllable object module doesn't have to remmber to do so

AzaezelX 1 hónapja
szülő
commit
26ea1b60fc

+ 3 - 0
Templates/BaseGame/game/core/clientServer/scripts/server/connectionToClient.tscript

@@ -363,6 +363,9 @@ function GameConnection::onDrop(%this, %reason)
    if($missionRunning)
    if($missionRunning)
    {
    {
       %hasGameMode = callGamemodeFunction("onClientLeaveGame", %this);
       %hasGameMode = callGamemodeFunction("onClientLeaveGame", %this);
+      // Cleanup the player
+      if (isObject(%client.player))
+         %client.player.delete();
    }
    }
    
    
    removeFromServerGuidList( %this.guid );
    removeFromServerGuidList( %this.guid );