From 83c3e8fd619985fe7c4f74d3affaa97ac46c448e Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 24 Aug 2018 15:18:59 +0200 Subject: [PATCH] Parse restart vote in VoteCommand_parse --- qcsrc/server/command/vote.qc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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; -- 2.39.2