]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a cvar to enable/disable voting before the match has started
authorMario <mario.mario@y7mail.com>
Sat, 22 Dec 2012 07:25:56 +0000 (18:25 +1100)
committerMario <mario.mario@y7mail.com>
Sat, 22 Dec 2012 07:25:56 +0000 (18:25 +1100)
qcsrc/server/autocvars.qh
qcsrc/server/command/vote.qc

index 16a7193c13710903da8cd9ed2db5143802504508..f3ece2af44ee6c4da987738df7d92222b8dab5de 100644 (file)
@@ -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;
index 767b2358b2926dd78affa38c7e460fe0f29a0456..56484a2a97b5bea826f094f20fdd1a803687c312 100644 (file)
@@ -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."); }