diff --git a/Classic/scripts/autoexec/MissionTypeOptions.cs b/Classic/scripts/autoexec/MissionTypeOptions.cs index baf682e..0efe6b1 100644 --- a/Classic/scripts/autoexec/MissionTypeOptions.cs +++ b/Classic/scripts/autoexec/MissionTypeOptions.cs @@ -56,6 +56,10 @@ function loadMissionStage2() $Host::HiVisibility = "0"; //always SPEED } + //TimeLimit Always 30 minutes in Tourney Mode + if($Host::TournamentMode) + $Host::TimeLimit = "30"; + //Siege NoBaseRape Fix if($CurrentMissionType $= "Siege") $Host::NoBaseRapeEnabled = 0; diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index d1c789b..fda128b 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -79,8 +79,10 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) switch$($CurrentMissionType) { case CTF or SCtF: + if($Host::TournamentMode) + %showTL = " - Time Limit:" SPC $Host::TimeLimit; messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win", - $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win"); + $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win" @ %showTL); case LakRabbit: %cap = "2000 Points to Win"; messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap, @@ -418,12 +420,31 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % //If proposed time is lower than server set or higher than unlimited if(%arg1 < $Host::TimeLimit || %arg1 > 999) { - messageClient(%client, "", "\c2Invalid time selection."); - return; + if(!%isAdmin) + { + messageClient(%client, "", "\c2Invalid time selection."); + return; + } + else //is an admin + { + if($Host::TournamentMode) //Admins still have the option to set the time to 30 minutes in Tourney Mode + { + if(%arg1 !$= "30") //30 minutes only + { + messageClient(%client, "", "\c2Invalid time selection."); + return; + } + } + else + { + messageClient(%client, "", "\c2Invalid time selection."); + return; + } + } } //If proposed time is something other than what is selectable - if(%arg1 !$= "90" && %arg1 !$= "120" && %arg1 !$= "150" && %arg1 !$= "180" && %arg1 !$= "240" && %arg1 !$= "360" && %arg1 !$= "480" && %arg1 !$= "999") + if(%arg1 !$= "30" && %arg1 !$= "45" && %arg1 !$= "60" && %arg1 !$= "75" && %arg1 !$= "90" && %arg1 !$= "180" && %arg1 !$= "360" && %arg1 !$= "999") { messageClient(%client, "", "\c2Only selectable times allowed."); return; diff --git a/Classic/scripts/defaultGame.cs b/Classic/scripts/defaultGame.cs index bad9b3f..13edbfa 100755 --- a/Classic/scripts/defaultGame.cs +++ b/Classic/scripts/defaultGame.cs @@ -2973,13 +2973,13 @@ function DefaultGame::sendGameTeamList( %game, %client, %key ) //------------------------------------------------------------------------------ function DefaultGame::sendTimeLimitList( %game, %client, %key ) { + messageClient( %client, 'MsgVoteItem', "", %key, 30, "", '30 minutes' ); + messageClient( %client, 'MsgVoteItem', "", %key, 45, "", '45 minutes' ); + messageClient( %client, 'MsgVoteItem', "", %key, 60, "", '60 minutes' ); + messageClient( %client, 'MsgVoteItem', "", %key, 75, "", '75 minutes' ); messageClient( %client, 'MsgVoteItem', "", %key, 90, "", '90 minutes' ); - messageClient( %client, 'MsgVoteItem', "", %key, 120, "", '120 minutes' ); - messageClient( %client, 'MsgVoteItem', "", %key, 150, "", '150 minutes' ); messageClient( %client, 'MsgVoteItem', "", %key, 180, "", '180 minutes' ); - messageClient( %client, 'MsgVoteItem', "", %key, 240, "", '240 minutes' ); messageClient( %client, 'MsgVoteItem', "", %key, 360, "", '360 minutes' ); - messageClient( %client, 'MsgVoteItem', "", %key, 480, "", '480 minutes' ); messageClient( %client, 'MsgVoteItem', "", %key, 999, "", 'No time limit' ); }