mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-13 23:24:34 +00:00
Score Restore Exception 3
This commit is contained in:
parent
b38b29b871
commit
8fcf30cc39
1 changed files with 20 additions and 19 deletions
|
|
@ -2369,28 +2369,30 @@ if($dtStats::Enable){
|
||||||
// Game Type Commons //
|
// Game Type Commons //
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
function dtStatsMissionDropReady(%game, %client){ // called when client has finished loading
|
function dtStatsMissionDropReady(%game, %client){ // called when client has finished loading
|
||||||
%foundOld =0;
|
%foundOld = 0;
|
||||||
if(!%client.isAIControlled() && !isObject(%client.dtStats))
|
if(!%client.isAIControlled() && !isObject(%client.dtStats))
|
||||||
{
|
{
|
||||||
for (%i = 0; %i < statsGroup.getCount(); %i++)
|
for (%i = 0; %i < statsGroup.getCount(); %i++)
|
||||||
{ // check to see if my old data is still there
|
{ // check to see if my old data is still there
|
||||||
%dtStats = statsGroup.getObject(%i);
|
%dtStats = statsGroup.getObject(%i);
|
||||||
if(%dtStats.guid == %client.guid)
|
if(%dtStats.guid == %client.guid && %dtStats.markForDelete == 0)
|
||||||
{
|
{
|
||||||
if(%dtStats.leftPCT < $dtStats::fgPercentage[%game.class] && $dtStats::fullGames[%game.class])
|
if(%dtStats.leftPCT < $dtStats::fgPercentage[%game.class] && $dtStats::fullGames[%game.class])
|
||||||
{
|
{
|
||||||
%client.dtStats.dtGameCounter = 0;// reset to 0 so this game does count this game
|
%client.dtStats.dtGameCounter = 0;// reset to 0 so this game does count this game
|
||||||
}
|
}
|
||||||
//error(%dtStats.guid SPC %client.guid);
|
//error(%dtStats.guid SPC %client.guid);
|
||||||
%client.dtStats = %dtStats;
|
%client.dtStats = %dtStats;
|
||||||
%dtStats.client = %client;
|
%dtStats.client = %client;
|
||||||
%dtStats.name = %client.name;
|
%dtStats.name = %client.name;
|
||||||
%dtStats.clientLeft = 0;
|
%dtStats.clientLeft = 0;
|
||||||
%dtStats.markForDelete = 0;
|
%dtStats.markForDelete = 0;
|
||||||
%foundOld =1;
|
%foundOld =1;
|
||||||
resGameStats(%client,%game.class); // restore stats;
|
resGameStats(%client,%game.class); // restore stats;
|
||||||
messageClient(%client, 'MsgClient', '\crWelcome back %1. Your score has been restored.~wfx/misc/rolechange.wav', %client.name);
|
if(%client.score >= 1 || %client.score <= -1 ){ //if(%num >= 1 || %num <= -1 ){
|
||||||
break;
|
messageClient(%client, 'MsgClient', '\crWelcome back %1. Your score has been restored.~wfx/misc/rolechange.wav', %client.name);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!%foundOld)
|
if(!%foundOld)
|
||||||
|
|
@ -2425,10 +2427,9 @@ function dtStatsMissionDropReady(%game, %client){ // called when client has fini
|
||||||
%client.dtStats.gameData[%game.class] = 1;
|
%client.dtStats.gameData[%game.class] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function dtStatsClientLeaveGame(%game, %client){
|
function dtStatsClientLeaveGame(%game, %client){
|
||||||
if(!%client.isAiControlled()){
|
if(!%client.isAiControlled() && isObject(%client.dtStats)){
|
||||||
if(%client.score == 0){
|
if(%client.score < 1 && %client.score > -1 ){ // if(%num < 1 && %num > -1 ){
|
||||||
%client.dtStats.delete();
|
%client.dtStats.delete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue