diff --git a/Classic/scripts/autoexec/z_dtStats.cs b/Classic/scripts/autoexec/z_dtStats.cs index 8670323..2789968 100644 --- a/Classic/scripts/autoexec/z_dtStats.cs +++ b/Classic/scripts/autoexec/z_dtStats.cs @@ -15,7 +15,7 @@ // Note See bottom of file for full log ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //-----------Settings----------- -$dtStats::version = 10.52; +$dtStats::version = 10.53; //disable stats system $dtStats::Enable = $Host::dtStatsEnable $= "" ? ($Host::dtStatsEnable = 1) : $Host::dtStatsEnable; if(!$dtStats::Enable){ return;}// so it disables with a restart @@ -3614,6 +3614,7 @@ function DefaultGame::sendCTFDebrif(%game,%client){ //print out the client %score = %cl.score $= "" ? 0 : %cl.score;// + %kills = %cl.kills $= "" ? 0 : %cl.kills; %nameColor = %cl == %client ? "" : ""; if(%cl == %client){ %line = '%9%1 %2%3%4%5%6%7%8'; @@ -3625,8 +3626,9 @@ function DefaultGame::sendCTFDebrif(%game,%client){ } } } + function extendedDebrief(%game, %client){ - if($dtStats::evoStyleDebrief && !%client.isWatchOnly){ + if($dtStats::evoStyleDebrief && !%client.isWatchOnly){ if(dtGameStat.gc["flag"] > 0){ messageClient( %client, 'MsgDebriefAddLine', "", ' ' ); messageClient( %client, 'MsgDebriefAddLine', "", 'FLAG STATS\tPLAYER\t' ); @@ -3781,19 +3783,19 @@ function extendedDebrief(%game, %client){ messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["bellyTurretDmg"],"NA")), mFormatFloat(dtGameStat.stat["bellyTurretDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["bellyTurretKills"],"NA")), dtGameStat.stat["bellyTurretKills"],%color1,%color2); } if(dtGameStat.stat["bomberBombsKills"] > 0){ - %line = 'Clamp Farmer\t%5%1\t%2\t%6%3\t%4'; + %line = 'Bomber Bombs\t%5%1\t%2\t%6%3\t%4'; %color1 = (%client == dtGameStat.client["bomberBombsDmg"]) ? "" : ""; %color2 = (%client == dtGameStat.client["bomberBombsKills"]) ? "" : ""; messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["bomberBombsDmg"],"NA")), mFormatFloat(dtGameStat.stat["bomberBombsDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["bomberBombsKills"],"NA")), dtGameStat.stat["bomberBombsKills"],%color1,%color2); } if(dtGameStat.stat["tankChaingunKills"] > 0){ - %line = 'Tank Gunner (chain)\t%5%1\t%2\t%6%3\t%4'; + %line = 'Tank (chain)\t%5%1\t%2\t%6%3\t%4'; %color1 = (%client == dtGameStat.client["tankChaingunDmg"]) ? "" : ""; %color2 = (%client == dtGameStat.client["tankChaingunKills"]) ? "" : ""; messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["tankChaingunDmg"],"NA")), mFormatFloat(dtGameStat.stat["tankChaingunDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["tankChaingunKills"],"NA")), dtGameStat.stat["tankChaingunKills"],%color1,%color2); } if(dtGameStat.stat["tankMortarKills"] > 0){ - %line = 'Tank Gunner (mortar)\t%5%1\t%2\t%6%3\t%4'; + %line = 'Tank (mortar)\t%5%1\t%2\t%6%3\t%4'; %color1 = (%client == dtGameStat.client["tankMortarDmg"]) ? "" : ""; %color2 = (%client == dtGameStat.client["tankMortarKills"]) ? "" : ""; messageClient( %client, 'MsgDebriefAddLine', "", %line, StripMLControlChars(hasValueS(dtGameStat.name["tankMortarDmg"],"NA")), mFormatFloat(dtGameStat.stat["tankMortarDmg"], "%.2f"), StripMLControlChars(hasValueS(dtGameStat.name["tankMortarKills"],"NA")), dtGameStat.stat["tankMortarKills"],%color1,%color2); @@ -5316,8 +5318,13 @@ function ArenaGame::setupClientTeams(%game){ } function endGameTB(%game){ - if($TB::TBLog[$dtStats::gtNameShort[%game.class]]){ - logTB(%game);// log the outcome + if(!$TB::TBEnable[$dtStats::gtNameShort[%game.class]]){ + if($Host::TournamentMode){// load map data so we can update it as it does not load by default with TournamentMode + loadTBMap(%game); + } + if($TB::TBLog[$dtStats::gtNameShort[%game.class]]){ + logTB(%game);// log the outcome + } for(%x = 0; %x < statsGroup.getCount(); %x++){ %dtStats = statsGroup.getObject(%x); calcTBScores(%dtStats,%game); @@ -7556,6 +7563,9 @@ function clientDmgStats(%data, %position, %sourceObject, %targetObject, %damageT } else if(%sourceClass $= "Turret"){ %sourceClient = %sourceObject.owner; + if(!isObject(%sourceClient)){ + %sourceClient = %sourceObject.getControllingClient(); + } %sourceDT = %sourceClient.dtStats; } else if(%sourceClass $= "VehicleTurret" || %sourceClass $= "FlyingVehicle" || %sourceClass $= "HoverVehicle" || %sourceClass $= "WheeledVehicle"){ @@ -9082,7 +9092,7 @@ function statsMenu(%client,%game){ switch$(%opt0){ case "tmc": if(!$dtStats::tmCompile){ - buildTest(0); + buildTest(1); messageAll('MsgStats', '\c3Tournament stats build started, server performance will degrade for a few minutes~wfx/misc/hunters_greed.wav'); } %client.GlArg3 = 0;