From: terencehill Date: Fri, 24 Aug 2018 12:26:58 +0000 (+0200) Subject: Add a delay of 1 second before executing the command restart after a successful vote... X-Git-Tag: xonotic-v0.8.5~1918 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=acb451f08532f22c8538098b49d8815822d4b855;p=xonotic%2Fxonotic-data.pk3dir.git Add a delay of 1 second before executing the command restart after a successful vote for restart so that vote result can be seen and announcer can be heard --- diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 6d9b4d76e..1b53fef40 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -159,6 +159,11 @@ 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