From: Samual Date: Sat, 24 Dec 2011 16:25:38 +0000 (-0500) Subject: New feature: sv_vote_no_stops_vote: Basically, if the vote caller votes no, then... X-Git-Tag: xonotic-v0.6.0~188^2~28^2~80 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f7b075048866cd379e72e01f06b54b2d64fa974d;p=xonotic%2Fxonotic-data.pk3dir.git New feature: sv_vote_no_stops_vote: Basically, if the vote caller votes no, then that stops their vote without making them type vote stop in the console or such... It's a shortcut to end a vote if you called it ^_^ --- diff --git a/commands.cfg b/commands.cfg index fd602081f..220025777 100644 --- a/commands.cfg +++ b/commands.cfg @@ -230,6 +230,7 @@ set sv_vote_master 1 "Allows the use of the vote master system" set sv_vote_master_callable 1 "When set, users can use \"vmaster\" to call a vote to become master of voting commands" set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master" set sv_vote_master_playerlimit 2 "Minimum number of players needed for a player to be allowed to vote for master" +set sv_vote_no_stops_vote 1 "Allow the vote caller to stop his own vote simply by voting no" set sv_vote_singlecount 0 "set to 1 to count votes once after timeout or to 0 to count with every vote" set sv_vote_timeout 30 "a vote will timeout after this many seconds" set sv_vote_wait 120 "a player can not call a vote again for this many seconds when his vote was not accepted" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 01de83c39..97eac1032 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1157,6 +1157,7 @@ float autocvar_sv_vote_master_callable; string autocvar_sv_vote_master_commands; string autocvar_sv_vote_master_password; float autocvar_sv_vote_master_playerlimit; +float autocvar_sv_vote_no_stops_vote; float autocvar_sv_vote_nospectators; string autocvar_sv_vote_only_commands; float autocvar_sv_vote_override_mostrecent; diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index ac95b4556..b05ee3d27 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -765,6 +765,7 @@ void VoteCommand_no(float request, entity caller) // CLIENT ONLY { if not(vote_called) { print_to(caller, "^1No vote called."); } else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); } + else if(((caller == vote_caller) || !caller || caller.vote_master) && autocvar_sv_vote_no_stops_vote) { VoteStop(caller); } else // everything went okay, continue changing vote {