From: Mario Date: Sat, 28 Dec 2019 12:24:26 +0000 (+1000) Subject: Rename sv_hook_gamerestart to sv_hook_readyrestart, a more accurate name for its... X-Git-Tag: xonotic-v0.8.5~1180 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7d02a03bc9971b5c2e1fb90ad4c2947fdd5fe0cb;p=xonotic%2Fxonotic-data.pk3dir.git 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 --- 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)"