]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a delay of 1 second before executing the command restart after a successful vote...
authorterencehill <piuntn@gmail.com>
Fri, 24 Aug 2018 12:26:58 +0000 (14:26 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 24 Aug 2018 12:26:58 +0000 (14:26 +0200)
qcsrc/server/command/vote.qc

index 6d9b4d76e115b8189700c35fb0201d6369b99bca..1b53fef403e854e6ea706eaa314bb52469b16276 100644 (file)
@@ -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