mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 08:04:39 +00:00
Allow TKlogs to know damageType
This commit is contained in:
parent
f371025ff8
commit
4e039dd195
4 changed files with 10 additions and 7 deletions
2
Classic/scripts/CTFGame.cs
Normal file → Executable file
2
Classic/scripts/CTFGame.cs
Normal file → Executable file
|
|
@ -1213,7 +1213,7 @@ function CTFGame::updateKillScores(%game, %clVictim, %clKiller, %damageType, %im
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (%game.testTeamKill(%clVictim, %clKiller)) //otherwise test for a teamkill
|
if (%game.testTeamKill(%clVictim, %clKiller, %damageType)) //otherwise test for a teamkill
|
||||||
%game.awardScoreTeamKill(%clVictim, %clKiller);
|
%game.awardScoreTeamKill(%clVictim, %clKiller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
Classic/scripts/SCtFGame.cs
Normal file → Executable file
2
Classic/scripts/SCtFGame.cs
Normal file → Executable file
|
|
@ -1316,7 +1316,7 @@ function SCtFGame::updateKillScores(%game, %clVictim, %clKiller, %damageType, %i
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (%game.testTeamKill(%clVictim, %clKiller)) //otherwise test for a teamkill
|
if (%game.testTeamKill(%clVictim, %clKiller, %damageType)) //otherwise test for a teamkill
|
||||||
%game.awardScoreTeamKill(%clVictim, %clKiller);
|
%game.awardScoreTeamKill(%clVictim, %clKiller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ function ClassicChatLog(%client, %id, %team, %msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log Teamkills
|
// Log Teamkills
|
||||||
function teamkillLog(%victimID, %killerID)
|
function teamkillLog(%victimID, %killerID, %damageType)
|
||||||
{
|
{
|
||||||
if(!$Host::ClassicTeamKillLog)
|
if(!$Host::ClassicTeamKillLog)
|
||||||
return;
|
return;
|
||||||
|
|
@ -166,6 +166,9 @@ function teamkillLog(%victimID, %killerID)
|
||||||
if(!$CurrentMissionType $= "CTF" && !$CurrentMissionType $= "SCTF")
|
if(!$CurrentMissionType $= "CTF" && !$CurrentMissionType $= "SCTF")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//damageType
|
||||||
|
%type = getTaggedString($DamageTypeText[%damageType]);
|
||||||
|
|
||||||
//Killer tks / Victim tks
|
//Killer tks / Victim tks
|
||||||
//Note: %killerID.teamkills + 1 as this is added later
|
//Note: %killerID.teamkills + 1 as this is added later
|
||||||
//Tks For this map only
|
//Tks For this map only
|
||||||
|
|
@ -184,7 +187,7 @@ function teamkillLog(%victimID, %killerID)
|
||||||
%s = "[Kicked] ";
|
%s = "[Kicked] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$teamkillLog = formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %s @ %killerID.nameBase @ "(" @ %killerID.guid @ ")[" @ %ktk @ " tk] teamkilled" SPC %victimID.nameBase @ "[" @ %vtk @ " tk]. #P[" @ $HostGamePlayerCount @ "]" SPC "CM[" @ $CurrentMission @ "]";
|
$teamkillLog = formatTimeString("M-d") SPC formatTimeString("[hh:nn:a]") SPC %s @ %killerID.nameBase @ "(" @ %killerID.guid @ ")[" @ %type @ "][" @ %ktk @ " tk] teamkilled" SPC %victimID.nameBase @ "[" @ %vtk @ " tk]. #P[" @ $HostGamePlayerCount @ "]" SPC "CM[" @ $CurrentMission @ "]";
|
||||||
$teamkillLog = stripChars($teamkillLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
|
$teamkillLog = stripChars($teamkillLog, "\c0\c1\c2\c3\c4\c5\c6\c7\c8\c9\x10\x11\co\cp");
|
||||||
|
|
||||||
%logpath = $Host::ClassicTeamKillLogPath;
|
%logpath = $Host::ClassicTeamKillLogPath;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ package TKwarn
|
||||||
{
|
{
|
||||||
|
|
||||||
// From Evo
|
// From Evo
|
||||||
function DefaultGame::testTeamKill(%game, %victimID, %killerID)
|
function DefaultGame::testTeamKill(%game, %victimID, %killerID, %damageType)
|
||||||
{
|
{
|
||||||
if(!$countdownStarted && !$MatchStarted)
|
if(!$countdownStarted && !$MatchStarted)
|
||||||
return;
|
return;
|
||||||
|
|
@ -18,7 +18,7 @@ function DefaultGame::testTeamKill(%game, %victimID, %killerID)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Log TeamKill
|
// Log TeamKill
|
||||||
teamkillLog(%victimID, %killerID);
|
teamkillLog(%victimID, %killerID, %damageType);
|
||||||
|
|
||||||
// No Admins
|
// No Admins
|
||||||
if(%killerID.isAdmin)
|
if(%killerID.isAdmin)
|
||||||
|
|
@ -92,7 +92,7 @@ function TKkick( %client, %admin, %guid )
|
||||||
if ( isObject( %cl ) )
|
if ( isObject( %cl ) )
|
||||||
{
|
{
|
||||||
%client.setDisconnectReason( "You have been kicked out of the game for teamkilling." ); // z0dd - ZOD, 7/13/03. Tell who kicked
|
%client.setDisconnectReason( "You have been kicked out of the game for teamkilling." ); // z0dd - ZOD, 7/13/03. Tell who kicked
|
||||||
%cl.schedule(700, "delete");
|
%cl.schedule(700, "delete");
|
||||||
}
|
}
|
||||||
// ban by IP as well
|
// ban by IP as well
|
||||||
BanList::add( %guid, %client.getAddress(), $Host::KickBanTime );
|
BanList::add( %guid, %client.getAddress(), $Host::KickBanTime );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue