From 63a00f129f66232bdc2b9b0f3af9e08884ac519e Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 20 Feb 2017 12:39:08 +1000 Subject: [PATCH] Add a new hook for client shutdown (disconnects etc) --- gamemodes.cfg | 1 + qcsrc/client/main.qc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/gamemodes.cfg b/gamemodes.cfg index 13a04fb42..80d990226 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -39,6 +39,7 @@ alias cl_hook_gamestart_ka alias cl_hook_gamestart_ft alias cl_hook_gamestart_inv alias cl_hook_gameend "rpn /cl_matchcount dup load 1 + =" // increase match count every time a game ends +alias cl_hook_shutdown alias cl_hook_activeweapon alias _sv_hook_gamestart "set _sv_hook_gametype $1; _sv_hook_gamestart_stage2" diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index a24d07d3a..a231cd4dc 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -209,6 +209,8 @@ void Shutdown() localcmd("\ncl_hook_gameend\n"); } + localcmd("\ncl_hook_shutdown\n"); + deactivate_minigame(); HUD_MinigameMenu_Close(NULL, NULL, NULL); } -- 2.39.2