From b39b581f04b58f56368737a8457fabdf93cba1d5 Mon Sep 17 00:00:00 2001 From: justgo97 Date: Thu, 4 May 2017 11:45:29 +0100 Subject: [PATCH] Added SPEC team to autojoin (#142) * Added SPEC team to autojoin * added more details to game.cfg --- dist/game.cfg | 2 +- regamedll/dlls/multiplay_gamerules.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/game.cfg b/dist/game.cfg index 40f11528..4fa56a1a 100644 --- a/dist/game.cfg +++ b/dist/game.cfg @@ -88,7 +88,7 @@ mp_refill_bpammo_weapons 0 // Automatically joins the team // 0 - disabled -// 1 - enabled (Use in conjunction with the cvar humans_join_team any/CT/T) +// 1 - enabled (Use in conjunction with the cvar humans_join_team any/SPEC/CT/T) // // Default value: "0" mp_auto_join_team 0 diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 99baef24..fd457007 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -3653,6 +3653,10 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerThink)(CBasePlayer *pPlayer) { slot = MENU_SLOT_TEAM_RANDOM; } + else if (!Q_stricmp(humans_join_team.string, "SPEC") && auto_join_team.value != 0.0f) + { + slot = MENU_SLOT_TEAM_SPECT; + } #endif else {