MissionType/PUGpassword changes

This commit is contained in:
ChocoTaco 2019-02-24 05:03:49 -05:00
parent 2ec4150949
commit 33b20f0664
6 changed files with 47 additions and 67 deletions

Binary file not shown.

View file

@ -1376,7 +1376,6 @@ $Host::Password = "pickup";
$Host::PlayerRespawnTimeout = 60;
$Host::Port = 28000;
$Host::PUGautoPassword = 0;
$Host::PUGautoPasswordLimit = 10;
$Host::PUGPassword = "pickup";
$Host::PureServer = 0;
$Host::SCtFProMode = 0;

View file

@ -32,8 +32,8 @@ if (!isActivePackage(StartTeamCounts))
function GetTeamCounts( %game, %client, %respawn )
{
//Check pug password
CheckPUGpassword();
//Run MissionTypeOptions
MissionTypeOptions();
//Get teamcounts
if( $GetCountsClientTeamChange && $countdownStarted && $MatchStarted )

View file

@ -0,0 +1,44 @@
// To manage options in certain missiontypes
// called in Getcounts.csk
// Variables
// Add these to ServerPrefs
//
// Turn on Auto Password in Tournament mode
// $Host::PUGautoPassword = 1;
// The PUG password you want
// $Host::PUGPassword = "pickup";
//
function MissionTypeOptions()
{
//Only run before mission start and countdown start
if( !$MatchStarted && !$countdownStarted )
{
if( $CurrentMissionType !$= "LakRabbit" )
{
if( $Host::TournamentMode && $Host::PUGautoPassword )
$Host::Password = $Host::PUGPassword;
else if( !$Host::TournamentMode )
{
$Host::Password = "";
}
$Host::HiVisibility = "0";
}
else if( $CurrentMissionType $= "LakRabbit" )
{
$Host::Password = "";
$Host::TournamentMode = 0;
$Host::HiVisibility = "1";
}
//For zCheckVar.cs TournyNetClient
if( $CurrentMissionType !$= "CTF" && $CheckVerObserverRunOnce )
CheckVerObserverReset();
//echo ("PUGpassCheck");
}
}

View file

@ -1,62 +0,0 @@
// To activate a password in certain gamemodes
// called in Getcounts.cs
// and also other options like distance and speed
// turn tournament mode off when switched to lak
// Variables
// Add these to ServerPrefs
//
// Turn on Auto Password at a player limit
// $Host::PUGautoPassword = 1;
// What value does Auto Password turn on
// $Host::PUGautoPasswordLimit = 10;
// The PUG password you want
// $Host::PUGPassword = "pickup";
//
function CheckPUGpassword()
{
//Only run before mission start and countdown start
if( !$MatchStarted && !$countdownStarted )
{
if( $CurrentMissionType !$= "LakRabbit" )
{
if( $Host::TournamentMode )
$Host::Password = $Host::PUGPassword;
else if( !$Host::TournamentMode )
{
$Host::Password = "";
//if 10 players are already on the server when the map changes
if( $TotalTeamPlayerCount >= $Host::PUGautoPasswordLimit && $Host::PUGautoPassword )
$Host::Password = $Host::PUGPassword;
}
$Host::HiVisibility = "0";
}
else if( $CurrentMissionType $= "LakRabbit" )
{
$Host::Password = "";
$Host::TournamentMode = 0;
$Host::HiVisibility = "1";
}
//For zCheckVar.cs TournyNetClient
if( $CurrentMissionType !$= "CTF" && $CheckVerObserverRunOnce )
CheckVerObserverReset();
//echo ("PUGpassCheck");
}
//If someone changes teams
else if( $Host::PUGautoPassword && $CurrentMissionType !$= "LakRabbit" && !$Host::TournamentMode )
{
if( $TotalTeamPlayerCount < $Host::PUGautoPasswordLimit )
$Host::Password = "";
else if( $TotalTeamPlayerCount >= $Host::PUGautoPasswordLimit )
$Host::Password = $Host::PUGPassword;
//echo ("PUGpassCheckTeamchange");
}
}

View file

@ -185,8 +185,7 @@ $Host::EnableVoteSound = 1; //If you want a sound chime during voting
$Host::AntiCloakEnable = 1; //Enable or disable AntiCloak
$Host::AntiCloakPlayerCount = 6; //How many to enable Cloak
$Host::PUGautoPassword = 0; //Enable or Disable an auto password at a certain amount of players
$Host::PUGautoPasswordLimit = 10; //How many to enable a pug password
$Host::PUGPassword = "pickup"; //pug password
$Host::PUGPassword = "pickup"; //PUG password
$Host::EmptyServerReset = 1; //Whether or not you want the server to reset when its empty
$Host::EnableAutobalance = 1; //Will autobalance when teams are uneven.
$Host::DMSLOnlyMode = 0; //Shocklance Only Mode for Deathmatch