From: z411 Date: Fri, 3 Dec 2021 03:09:16 +0000 (-0300) Subject: Make allready not votable if in a match X-Git-Tag: xonotic-v0.8.5~253^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3c29496e2c6d820a8f7d4af19b9567b9f4ba487c;p=xonotic%2Fxonotic-data.pk3dir.git Make allready not votable if in a match --- diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 5b671fb09..d2848ac60 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -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); } diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 695d8842e..097b7e133 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -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;