]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Parse restart vote in VoteCommand_parse
authorterencehill <piuntn@gmail.com>
Fri, 24 Aug 2018 13:18:59 +0000 (15:18 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 24 Aug 2018 13:18:59 +0000 (15:18 +0200)
qcsrc/server/command/vote.qc

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