]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make allready not votable if in a match
authorz411 <z411@omaera.org>
Fri, 3 Dec 2021 03:09:16 +0000 (00:09 -0300)
committerz411 <z411@omaera.org>
Fri, 3 Dec 2021 03:09:16 +0000 (00:09 -0300)
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc

index 5b671fb09db1f12b25db27cd9a0ea8bd32e97fdc..d2848ac6047e75ad460294b182ec4ba735edfa0e 100644 (file)
@@ -1670,7 +1670,7 @@ SERVER_COMMAND(nospectators, "Automatically remove spectators from a match") { G
 SERVER_COMMAND(printstats, "Dump eventlog player stats and other score information") { GameCommand_printstats(request); }
 SERVER_COMMAND(radarmap, "Generate a radar image of the map") { GameCommand_radarmap(request, arguments); }
 SERVER_COMMAND(reducematchtime, "Decrease the timelimit value incrementally") { GameCommand_reducematchtime(request); }
-SERVER_COMMAND(reset, "Soft restart the game without changing teams, going back to warmup if enabled") { GameCommand_reset(request); }
+SERVER_COMMAND(reset, "Soft restart the game without changing teams; goes back to warmup if enabled") { GameCommand_reset(request); }
 SERVER_COMMAND(setbots, "Adjust how many bots are in the match") { GameCommand_setbots(request, arguments); }
 SERVER_COMMAND(shuffleteams, "Randomly move players to different teams") { GameCommand_shuffleteams(request); }
 SERVER_COMMAND(stuffto, "Send a command to be executed on a client") { GameCommand_stuffto(request, arguments); }
index 695d8842e8e78753a6e5fea672136f5698a4b7d0..097b7e1331e8a392d81156d5ef321e2e30fee6a6 100644 (file)
@@ -765,6 +765,18 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa
                        break;
                }
 
+               case "allready":
+               {
+                       if(!warmup_stage) {
+                               print_to(caller, "Game already started. Use the reset command to restart the match.");
+                               return -1;
+                       }
+
+                       vote_parsed_command = vote_command;
+                       vote_parsed_display = strzone(strcat("^1", vote_command));
+                       break;
+               }
+
                default:
                {
                        vote_parsed_command = vote_command;