From: terencehill Date: Fri, 24 Aug 2018 13:18:59 +0000 (+0200) Subject: Parse restart vote in VoteCommand_parse X-Git-Tag: xonotic-v0.8.5~1915 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=83c3e8fd619985fe7c4f74d3affaa97ac46c448e;p=xonotic%2Fxonotic-data.pk3dir.git Parse restart vote in VoteCommand_parse --- diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 1b53fef40..7fb46c125 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -159,11 +159,6 @@ void VoteAccept() bprint("\{1}^2* ^3", OriginalCallerName(), "^2's vote for ^1", vote_called_display, "^2 was accepted\n"); if ((vote_called == VOTE_MASTER) && vote_caller) vote_caller.vote_master = 1; - else if (vote_called_command == "restart") - { - // add a delay so that vote result can be seen and announcer can be heard - localcmd(strcat("defer 1 ", vote_called_command, "\n")); - } else localcmd(strcat(vote_called_command, "\n")); if (vote_caller) vote_caller.vote_waittime = 0; // people like your votes, you don't need to wait to vote again @@ -719,6 +714,14 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa break; } + case "restart": + { + vote_parsed_command = strcat("defer 1 ", vote_command); + vote_parsed_display = strzone(strcat("^1", vote_command)); + + break; + } + default: { vote_parsed_command = vote_command;