This commit is contained in:
speedvoltage 2025-03-29 21:43:58 +01:00 committed by GitHub
commit 48a554ff4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 1 deletions

View file

@ -63,6 +63,11 @@ void FinishClientPutInServer( CHL2MP_Player *pPlayer )
ClientPrint( pPlayer, HUD_PRINTTALK, "You are on team %s1\n", pPlayer->GetTeam()->GetName() );
}
if ( pPlayer->GetTeamNumber() == TEAM_SPECTATOR )
{
pPlayer->RemoveAllItems( true );
}
const ConVar *hostname = cvar->FindVar( "hostname" );
const char *title = (hostname) ? hostname->GetString() : "MESSAGE OF THE DAY";

View file

@ -999,6 +999,9 @@ void CHL2MP_Player::ChangeTeam( int iTeam )
{
RemoveAllItems( true );
if ( FlashlightIsOn() )
FlashlightTurnOff();
State_Transition( STATE_OBSERVER_MODE );
}

View file

@ -1026,7 +1026,8 @@ void CHL2MPRules::RestartGame()
pPlayer->GetActiveWeapon()->Holster();
}
pPlayer->RemoveAllItems( true );
respawn( pPlayer, false );
if ( pPlayer->GetTeamNumber() != TEAM_SPECTATOR )
respawn( pPlayer, false );
pPlayer->Reset();
}