Merge branch 'NoEvo'

This commit is contained in:
ChocoTaco1 2020-04-17 15:29:09 -04:00
commit 1ccfa797d0
4 changed files with 111 additions and 98 deletions

View file

@ -88,15 +88,22 @@ function ClassicChatLog(%client, %id, %team, %msg)
return;
// Don't log voicepack stuff.
if(strstr(%msg, "~w") != -1)
if(strstr(%msg, "~w") != -1 || strstr(%msg, "flag") != -1)
return;
%team = getTaggedString(Game.getTeamName(%team));
if(%team $= "Unassigned")
%team = "Observer";
else if($CurrentMissionType $= "LakRabbit" || $CurrentMissionType $= "DM")
%team = $dtStats::gtNameLong[%client.lgame]; //from zDarktigerStats.cs
switch$(%id)
{
case 0:
%team = "[Global]";
case 1:
%team = "["@getTaggedString(Game.getTeamName(%team))@"]";
%team = "[" @ %team @ "]";
case 2:
%team = "[Admin]";
case 3:
@ -105,10 +112,7 @@ function ClassicChatLog(%client, %id, %team, %msg)
%team = "[Centerprint]";
}
// Make it all uppercase
%team = strupr(%team);
$ClassicChatLog = "["@formattimestring("H:nn:ss")@"]" SPC %team SPC getTaggedString(%client.name) @": "@%msg;
$ClassicChatLog = "["@formattimestring("H:nn:ss")@"] "@%team SPC getTaggedString(%client.name)@": "@%msg;
$ClassicChatLog = stripChars($ClassicChatLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
%path = $Host::ClassicChatLogPath @ formatTimeString("/yy/mm-MM/dd.log");
export("$ClassicChatLog", %path, true);

View file

@ -235,7 +235,7 @@ $dtStats::gtNameShort["DMGame"] = "DM";
$dtStats::gtNameShort["SCtFGame"] = "LCTF";
$dtStats::gtNameShort["ArenaGame"] = "Arena";
$dtStats::gtNameShort["DuelGame"] = "Duel";
//Display name
//Display name - rely on these in tacoserver enablelogs.cs
$dtStats::gtNameLong["CTFGame"] = "Capture the Flag";
$dtStats::gtNameLong["LakRabbitGame"] = "LakRabbit";
$dtStats::gtNameLong["DMGame"] = "Deathmatch";
@ -786,6 +786,8 @@ $dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "shockHitMaxDist";
$dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "packpickupCount";
$dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "weaponpickupCount";
$dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "repairpackpickupCount";
$dtStats::FV[$dtStats::FC["dtStats"]++,"dtStats"] = "dtTeam";
///////////////////////////////////////////////////////////////////
$dtStats::uFC["dtStats"] = 0; // not saved but used to calculate other stats that are saved
@ -3211,6 +3213,9 @@ function DefaultGame::postGameStats(%game,%client){ //stats to add up at the end
else if(%game.class $= "LakRabbitGame"){
%client.flagTimeMin = mFloor((%client.flagTimeMS / 1000)/60);
}
//Record clients team
%client.dtTeam = %client.team;
}
function DefaultGame::getGamePct(%game)