From b38b29b871a1bfd32bddd6264a816bc2b8410d70 Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Thu, 13 Jun 2019 16:03:28 -0400 Subject: [PATCH] Score Restore Exception 2 If a player leaves and their score is 0. Their score will not be save to be restored later. --- Classic/scripts/autoexec/zDarkTigerStats.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Classic/scripts/autoexec/zDarkTigerStats.cs b/Classic/scripts/autoexec/zDarkTigerStats.cs index f9217c4..dabd456 100644 --- a/Classic/scripts/autoexec/zDarkTigerStats.cs +++ b/Classic/scripts/autoexec/zDarkTigerStats.cs @@ -2388,11 +2388,8 @@ function dtStatsMissionDropReady(%game, %client){ // called when client has fini %dtStats.clientLeft = 0; %dtStats.markForDelete = 0; %foundOld =1; - if(%dtStats.score !$= 0) - { - resGameStats(%client,%game.class); // restore stats; - messageClient(%client, 'MsgClient', '\crWelcome back %1. Your score has been restored.~wfx/misc/rolechange.wav', %client.name); - } + resGameStats(%client,%game.class); // restore stats; + messageClient(%client, 'MsgClient', '\crWelcome back %1. Your score has been restored.~wfx/misc/rolechange.wav', %client.name); break; } } @@ -2431,12 +2428,17 @@ function dtStatsMissionDropReady(%game, %client){ // called when client has fini function dtStatsClientLeaveGame(%game, %client){ if(!%client.isAiControlled()){ + if(%client.score == 0){ + %client.dtStats.delete(); + return; + } %client.dtStats.clientLeft = 1; %game.gameWinStat(%client); bakGameStats(%client,%game.class);//back up there current game in case they lost connection %client.dtStats.leftPCT = %game.getGamePct(); } } + function dtStatsTimeLimitReached(%game){ %game.timeLimitHit = 1; if($dtStats::fullGames[%game.class]){