From: Mario Date: Sat, 22 Dec 2012 07:25:56 +0000 (+1100) Subject: Add a cvar to enable/disable voting before the match has started X-Git-Tag: xonotic-v0.7.0~155^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5aa6411a3b7ea2fdabc7fb0d65d7085b222e64fd;p=xonotic%2Fxonotic-data.pk3dir.git Add a cvar to enable/disable voting before the match has started --- diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 16a7193c1..f3ece2af4 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 767b2358b..56484a2a9 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."); }