From be0adbecca518fd6df896fe98f2bf881872225be Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Sat, 11 Jan 2025 17:41:16 -0500 Subject: [PATCH] Skip Confirm+ --- Classic/scripts/DMGame.cs | 2 +- Classic/scripts/LCTFGame.cs | 2 +- Classic/scripts/LakRabbitGame.cs | 2 +- Classic/scripts/SCtFGame.cs | 2 +- Classic/scripts/autoexec/VoteMenu.cs | 13 ++++++++----- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Classic/scripts/DMGame.cs b/Classic/scripts/DMGame.cs index 8b85265..e07e18d 100644 --- a/Classic/scripts/DMGame.cs +++ b/Classic/scripts/DMGame.cs @@ -839,7 +839,7 @@ function DMGame::sendGameVoteMenu(%game, %client, %key) if(%game.scheduleVote $= "") { //echo(%client.ForceVote); - if(%client.ForceVote $= "skip_confirm") + if(%client.ForceVote $= "skip_confirm+") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) diff --git a/Classic/scripts/LCTFGame.cs b/Classic/scripts/LCTFGame.cs index 3ef93b0..f3c2bc8 100644 --- a/Classic/scripts/LCTFGame.cs +++ b/Classic/scripts/LCTFGame.cs @@ -2265,7 +2265,7 @@ function LCTFGame::sendGameVoteMenu(%game, %client, %key) if(%game.scheduleVote $= "") { //echo(%client.ForceVote); - if(%client.ForceVote $= "skip_confirm") + if(%client.ForceVote $= "skip_confirm+") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) diff --git a/Classic/scripts/LakRabbitGame.cs b/Classic/scripts/LakRabbitGame.cs index 10d050d..897f929 100644 --- a/Classic/scripts/LakRabbitGame.cs +++ b/Classic/scripts/LakRabbitGame.cs @@ -1175,7 +1175,7 @@ function LakRabbitGame::sendGameVoteMenu( %game, %client, %key ) if( %game.scheduleVote $= "" ) { //echo(%client.ForceVote); - if(%client.ForceVote $= "skip_confirm") + if(%client.ForceVote $= "skip_confirm+") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) diff --git a/Classic/scripts/SCtFGame.cs b/Classic/scripts/SCtFGame.cs index 1afacf3..0428d5f 100644 --- a/Classic/scripts/SCtFGame.cs +++ b/Classic/scripts/SCtFGame.cs @@ -2006,7 +2006,7 @@ function SCtFGame::sendGameVoteMenu(%game, %client, %key) if ( %game.scheduleVote $= "" ) { //echo(%client.ForceVote); - if(%client.ForceVote $= "skip_confirm") + if(%client.ForceVote $= "skip_confirm+") return; if(!%isAdmin || (%isAdmin && %client.ForceVote)) diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index b101845..0cddec6 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -41,11 +41,13 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) %multipleTeams = %game.numTeams > 1; %client.k = %key; //For set next mission - if (%client.ForceVote > 0) + if(%client.ForceVote > 0) %client.ForceVote = %client.ForceVote - 1; + if(%client.ForceVote $= "skip_confirm+") + %client.ForceVote = 0; //Admin Submenu - if (%client.ForceVote > 0) + if(%client.ForceVote > 0) { if(!$Host::TournamentMode) messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode'); @@ -67,6 +69,7 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) { messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipConfirm', 'Are you sure you want to Skip the Mission?','Are you sure you want to Skip the Mission?'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'Yes, Skip the Mission', 'Yes, Skip the Mission' ); + %client.ForceVote = "skip_confirm+"; return; } @@ -554,13 +557,13 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % } case "VoteSkipConfirm": - if(%isAdmin && %client.ForceVote !$= "skip_confirm") + if(%client.ForceVote $= "skip_confirm+") + %client.ForceVote = 0; + else if(%isAdmin && %client.ForceVote !$= "skip_confirm") { %client.ForceVote = "skip_confirm"; return; } - else - %client.ForceVote = 0; case "VoteSkipMission": if((!%isAdmin && $Host::AllowPlayerVoteSkipMission) || (%isAdmin && %client.ForceVote))