From 5aa6411a3b7ea2fdabc7fb0d65d7085b222e64fd Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 22 Dec 2012 18:25:56 +1100 Subject: [PATCH] Add a cvar to enable/disable voting before the match has started --- qcsrc/server/autocvars.qh | 1 + qcsrc/server/command/vote.qc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 16a7193c13..f3ece2af44 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1229,6 +1229,7 @@ float autocvar_sv_vote_singlecount; float autocvar_sv_vote_stop; float autocvar_sv_vote_timeout; float autocvar_sv_vote_wait; +float autocvar_sv_vote_gamestart; float autocvar_sv_warsowbunny_accel; float autocvar_sv_warsowbunny_airforwardaccel; float autocvar_sv_warsowbunny_backtosideratio; diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 767b2358b2..56484a2a97 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -694,7 +694,7 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm vote_command = VoteCommand_extractcommand(vote_command, 2, argc); if not(autocvar_sv_vote_call || !caller) { print_to(caller, "^1Vote calling is not allowed."); } - else if(time < game_starttime) { print_to(caller, "^1Voting is not allowed before the match has started."); } + else if(!autocvar_sv_vote_gamestart && time < game_starttime) { print_to(caller, "^1Vote calling is not allowed before the match has started."); } else if(vote_called) { print_to(caller, "^1There is already a vote called."); } else if(!spectators_allowed && (caller && (caller.classname != "player"))) { print_to(caller, "^1Only players can call a vote."); } else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); } -- 2.39.2