Various Tournament mode fixes

-Issues with antipack not turning off in tournament mode
-No teamkill warnings in tournament mode
This commit is contained in:
ChocoTaco 2022-01-19 12:46:10 -05:00
parent 7063b5f09d
commit 4f5b21dc6c
3 changed files with 23 additions and 5 deletions

View file

@ -37,7 +37,7 @@ function connectLog(%client, %isDisconnect)
{ {
// get the client info // get the client info
%authInfo = %client.getAuthInfo(); %authInfo = %client.getAuthInfo();
%ip = getField(strreplace(%client.getAddress(),":","\t"),1); %ip = getField(strreplace(%client.getAddress(),":","\t"),1);
// net tournament client present? // net tournament client present?
if (!%client.t2csri_sentComCertDone) if (!%client.t2csri_sentComCertDone)
@ -177,7 +177,7 @@ function teamkillLog(%victimID, %killerID, %damageType)
//Stage in warnings //Stage in warnings
%s = ""; %s = "";
if(!%killerID.isAdmin) //Admins dont get warnings if(!%killerID.isAdmin && !$Host::TournamentMode) //Admins dont get warnings. No warnings in Tournament Mode
{ {
if(%ktk >= $Host::TKWarn1 && %ktk < $Host::TKWarn2) if(%ktk >= $Host::TKWarn1 && %ktk < $Host::TKWarn2)
%s = "[Warned] "; %s = "[Warned] ";

View file

@ -52,6 +52,20 @@ function loadMissionStage2()
$Host::HiVisibility = "0"; //always SPEED $Host::HiVisibility = "0"; //always SPEED
} }
//Disable Antipack in tournament mode
if($Host::TournamentMode)
{
if($InvBanList[CTF, "CloakingPack"])
$InvBanList[CTF, "CloakingPack"] = 0;
if(isActivePackage(AntiPackCloak))
deactivatePackage(AntiPackCloak);
if($InvBanList[CTF, "ShieldPack"])
$InvBanList[CTF, "ShieldPack"] = 0;
if(isActivePackage(AntiPackShield))
deactivatePackage(AntiPackShield);
}
//Siege NoBaseRape Fix //Siege NoBaseRape Fix
if($CurrentMissionType $= "Siege") if($CurrentMissionType $= "Siege")
$Host::NoBaseRapeEnabled = 0; $Host::NoBaseRapeEnabled = 0;

View file

@ -14,18 +14,22 @@ function DefaultGame::testTeamKill(%game, %victimID, %killerID, %damageType)
return false; // is not a tk return false; // is not a tk
// No Bots // No Bots
if(%killerID.isAIcontrolled() || %victimID.isAIcontrolled()) //if(%killerID.isAIcontrolled() || %victimID.isAIcontrolled())
return true; // return true;
// Log TeamKill // Log TeamKill
teamkillLog(%victimID, %killerID, %damageType); teamkillLog(%victimID, %killerID, %damageType);
//No warnings in tournament mode
if($Host::TournamentMode)
return true;
// No Admins // No Admins
if(%killerID.isAdmin) if(%killerID.isAdmin)
return true; return true;
// Ignore this map // Ignore this map
if($CurrentMission $= "Mac_FlagArena" || $CurrentMission $= "Machineeggs" || $CurrentMission $= "DMP_SimpleFlagArena") if($CurrentMission $= "Mac_FlagArena" || $CurrentMission $= "Machineeggs")
return true; return true;
// warn the player of the imminent kick vote // warn the player of the imminent kick vote