From 7d02a03bc9971b5c2e1fb90ad4c2947fdd5fe0cb Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 28 Dec 2019 22:24:26 +1000 Subject: [PATCH] Rename sv_hook_gamerestart to sv_hook_readyrestart, a more accurate name for its functionality. A note has been left where sv_hook_gamerestart used to be for admins to find the new hook name --- gamemodes-server.cfg | 4 +++- qcsrc/server/command/vote.qc | 2 +- xonotic-server.cfg | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index 6d8ee6f07..cd71ecec0 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -29,7 +29,9 @@ alias sv_hook_gamestart_ka alias sv_hook_gamestart_ft alias sv_hook_gamestart_inv alias sv_hook_gamestart_duel -alias sv_hook_gamerestart +// there is currently no hook for when the match is restarted +// see sv_hook_readyrestart for previous uses of this hook +//alias sv_hook_gamerestart alias sv_hook_gameend diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index b611ab266..90073beaa 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -477,7 +477,7 @@ void ReadyRestart_force() void ReadyRestart() { if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || game_stopped || race_completing) localcmd("restart\n"); - else localcmd("\nsv_hook_gamerestart\n"); + else localcmd("\nsv_hook_readyrestart\n"); // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off! // Otherwise scores could be manipulated during the countdown. diff --git a/xonotic-server.cfg b/xonotic-server.cfg index 4e9685ba4..fad9b90f6 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -19,6 +19,8 @@ set sv_ready_restart 0 "allow a map to be restarted once all players pressed the set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown" set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed" +alias sv_hook_readyrestart + //nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining set teamplay_lockonrestart 0 "lock teams once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)" -- 2.39.2