Do not ignore thirdparty bots in humans_join_team cvar checks. (#306)

Game dll considers third party bots as humans when dealing with humans_join_team cvar, thus making those bots to join team specified in this cvar.
This commit is contained in:
jeefo 2018-09-09 11:39:22 +03:00 committed by Dmitry Novikov
parent 26db32e884
commit e924a266b0
2 changed files with 6 additions and 2 deletions

View File

@ -1904,7 +1904,7 @@ BOOL EXT_FUNC __API_HOOK(HandleMenu_ChooseTeam)(CBasePlayer *pPlayer, int slot)
if (team != SPECTATOR && !pPlayer->IsBot() if (team != SPECTATOR && !pPlayer->IsBot()
#ifdef REGAMEDLL_ADD #ifdef REGAMEDLL_ADD
&& auto_join_team.value != 1.0f && !(pPlayer->pev->flags & FL_FAKECLIENT) && auto_join_team.value != 1.0f
#endif #endif
) )
{ {

View File

@ -3587,7 +3587,11 @@ void CHalfLifeMultiplay::PlayerThink(CBasePlayer *pPlayer)
pPlayer->m_iMenu = Menu_ChooseTeam; pPlayer->m_iMenu = Menu_ChooseTeam;
pPlayer->m_iJoiningState = PICKINGTEAM; pPlayer->m_iJoiningState = PICKINGTEAM;
if (slot != MENU_SLOT_TEAM_UNDEFINED && !pPlayer->IsBot()) if (slot != MENU_SLOT_TEAM_UNDEFINED && !pPlayer->IsBot()
#ifdef REGAMEDLL_ADD
&& !(pPlayer->pev->flags & FL_FAKECLIENT)
#endif
)
{ {
#ifdef REGAMEDLL_ADD #ifdef REGAMEDLL_ADD
m_bSkipShowMenu = (auto_join_team.value != 0.0f) && !(pPlayer->pev->flags & FL_FAKECLIENT); m_bSkipShowMenu = (auto_join_team.value != 0.0f) && !(pPlayer->pev->flags & FL_FAKECLIENT);