Skip to content

Commit

Permalink
Do not ignore thirdparty bots in humans_join_team cvar checks. (#306)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeefo authored and s1lentq committed Sep 9, 2018
1 parent 26db32e commit e924a26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion regamedll/dlls/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,7 @@ BOOL EXT_FUNC __API_HOOK(HandleMenu_ChooseTeam)(CBasePlayer *pPlayer, int slot)

if (team != SPECTATOR && !pPlayer->IsBot()
#ifdef REGAMEDLL_ADD
&& auto_join_team.value != 1.0f
&& !(pPlayer->pev->flags & FL_FAKECLIENT) && auto_join_team.value != 1.0f
#endif
)
{
Expand Down
6 changes: 5 additions & 1 deletion regamedll/dlls/multiplay_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3587,7 +3587,11 @@ void CHalfLifeMultiplay::PlayerThink(CBasePlayer *pPlayer)
pPlayer->m_iMenu = Menu_ChooseTeam;
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
m_bSkipShowMenu = (auto_join_team.value != 0.0f) && !(pPlayer->pev->flags & FL_FAKECLIENT);
Expand Down

0 comments on commit e924a26

Please sign in to comment.