Fix players getting stuck in team unassigned on join

This commit is contained in:
Bakugo 2025-05-20 14:09:55 +01:00 committed by EricS-Valve
parent e83ecdfa3c
commit a85998aec5
1 changed files with 1 additions and 1 deletions

View File

@ -7343,7 +7343,7 @@ bool CTFPlayer::ClientCommand( const CCommand &args )
if ( FStrEq( pcmd, "jointeam" ) )
{
// don't let them spam the server with changes
if ( GetNextChangeTeamTime() > gpGlobals->curtime )
if ( GetNextChangeTeamTime() > gpGlobals->curtime && GetTeamNumber() != TEAM_UNASSIGNED )
return true;
SetNextChangeTeamTime( gpGlobals->curtime + 2.0f ); // limit to one change every 2 secs