Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions regamedll/dlls/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1893,6 +1893,15 @@ BOOL EXT_FUNC __API_HOOK(HandleMenu_ChooseTeam)(CBasePlayer *pPlayer, int slot)
}
}

#ifdef REGAMEDLL_FIXES
// Both teams are full and no bot could be vacated, deny;
// otherwise the player would get into the game while on UNASSIGNED team
if (team == UNASSIGNED)
{
return FALSE;
}
#endif

break;
}
case MENU_SLOT_TEAM_SPECT:
Expand Down
3 changes: 2 additions & 1 deletion regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10731,7 +10731,8 @@ bool EXT_FUNC CBasePlayer::__API_HOOK(GetIntoGame)()
void CBasePlayer::PlayerRespawnThink()
{
#ifdef REGAMEDLL_ADD
if (GetObserverMode() != OBS_NONE && (m_iTeam == UNASSIGNED || m_iTeam == SPECTATOR))
// Players without a team can never respawn (e.g. stuck at team menu when both teams are full)
if (m_iTeam == UNASSIGNED || m_iTeam == SPECTATOR)
return;

// Player cannot respawn while in the Choose Appearance menu
Expand Down
Loading