]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
moveto* votes: always show both player id and name in the vote panel since players...
authorterencehill <piuntn@gmail.com>
Sun, 28 May 2023 10:16:24 +0000 (12:16 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 28 May 2023 10:16:24 +0000 (12:16 +0200)
qcsrc/server/command/vote.qc

index 02cb8e1cec9c730f967833becf5b93b14ea8308d..ecf5dc9978a542aa914aa584f37c1a2f0a8d42d1 100644 (file)
@@ -746,6 +746,29 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa
 
        switch (first_command) // now go through and parse the proper commands to adjust as needed.
        {
+               case "movetoauto":
+               case "movetored":
+               case "movetoblue":
+               case "movetoyellow":
+               case "movetopink":
+               case "movetospec":
+               {
+                       entity victim = GetIndexedEntity(argc, (startpos + 1));
+                       float accepted = VerifyClientEntity(victim, true, false);
+                       if (accepted > 0)
+                       {
+                               vote_parsed_command = vote_command;
+                               vote_parsed_display = sprintf("^1%s #%d ^7%s", first_command, etof(victim), victim.netname);
+                       }
+                       else
+                       {
+                               print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n"));
+                               return 0;
+                       }
+
+                       break;
+               }
+
                case "kick":
                case "kickban":    // catch all kick/kickban commands
                {