Update zDarkTigerStats.cs

This commit is contained in:
ChocoTaco1 2020-04-10 16:16:41 -04:00
parent a74ad90f2f
commit 360f7b232e

View file

@ -785,6 +785,7 @@ $dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "shockHitMaxDist";
$dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "flipflopCount"; $dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "flipflopCount";
$dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "packpickupCount"; $dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "packpickupCount";
$dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "weaponpickupCount"; $dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "weaponpickupCount";
$dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "repairpackpickupCount";
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
$dtStats::uFC["dtStats"] = 0; // not saved but used to calculate other stats that are saved $dtStats::uFC["dtStats"] = 0; // not saved but used to calculate other stats that are saved
@ -1605,12 +1606,12 @@ package dtStatsGame{
function CTFGame::leaveMissionArea(%game, %playerData, %player){ function CTFGame::leaveMissionArea(%game, %playerData, %player){
parent::leaveMissionArea(%game, %playerData, %player); parent::leaveMissionArea(%game, %playerData, %player);
if($dtStats::Enable) if($dtStats::Enable)
%player.leavemissionareaCount++; %player.client.leavemissionareaCount++;
} }
function SCtFGame::leaveMissionArea(%game, %playerData, %player){ function SCtFGame::leaveMissionArea(%game, %playerData, %player){
parent::leaveMissionArea(%game, %playerData, %player); parent::leaveMissionArea(%game, %playerData, %player);
if($dtStats::Enable) if($dtStats::Enable)
%player.leavemissionareaCount++; %player.client.leavemissionareaCount++;
} }
function DefaultGame::clientChangeTeam(%game, %client, %team, %fromObs, %respawned){ // z0dd - ZOD, 6/06/02. Don't send a message if player used respawn feature. Added %respawned function DefaultGame::clientChangeTeam(%game, %client, %team, %fromObs, %respawned){ // z0dd - ZOD, 6/06/02. Don't send a message if player used respawn feature. Added %respawned
parent::clientChangeTeam(%game, %client, %team, %fromObs, %respawned); parent::clientChangeTeam(%game, %client, %team, %fromObs, %respawned);
@ -1620,22 +1621,25 @@ package dtStatsGame{
function FlipFlop::playerTouch(%data, %flipflop, %player){ function FlipFlop::playerTouch(%data, %flipflop, %player){
parent::playerTouch(%data, %flipflop, %player); parent::playerTouch(%data, %flipflop, %player);
if($dtStats::Enable) if($dtStats::Enable)
%player.flipflopCount++; %player.client.flipflopCount++;
} }
function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %teamSpecific, %msg){ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %teamSpecific, %msg){
parent::playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %teamSpecific, %msg); parent::playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %teamSpecific, %msg);
if($dtStats::Enable) if($dtStats::Enable)
%client.voteCount++; %client.voteCount++;
} }
function Player::pickup(%this,%obj,%amount){ function ItemData::onPickup(%this, %pack, %player, %amount){
parent::pickup(%this,%obj,%amount); parent::onPickup(%this, %pack, %player, %amount);
if($dtStats::Enable){ if($dtStats::Enable){
%data = %obj.getDataBlock(); if(%this.getname() $= "RepairPack")
if(%data.className $= Pack) %player.client.repairpackpickupCount++;
%this.packpickupCount++; %player.client.packpickupCount++;
else if(%data.className $= Weapon) }
%this.weaponpickupCount++; }
} function Weapon::onPickup(%this, %obj, %shape, %amount){
parent::onPickup(%this, %obj, %shape, %amount);
if($dtStats::Enable)
%this.weaponpickupCount++;
} }
}; };