From 3c29496e2c6d820a8f7d4af19b9567b9f4ba487c Mon Sep 17 00:00:00 2001 From: z411 Date: Fri, 3 Dec 2021 00:09:16 -0300 Subject: [PATCH] Make allready not votable if in a match --- qcsrc/server/command/sv_cmd.qc | 2 +- qcsrc/server/command/vote.qc | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) 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; -- 2.39.2