From: Mario Date: Mon, 20 Feb 2017 02:39:08 +0000 (+1000) Subject: Add a new hook for client shutdown (disconnects etc) X-Git-Tag: xonotic-v0.8.2~195 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=63a00f129f66232bdc2b9b0f3af9e08884ac519e;p=xonotic%2Fxonotic-data.pk3dir.git Add a new hook for client shutdown (disconnects etc) --- 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); }