Prevent crash on tank and spectator

This commit is contained in:
mittorn 2016-12-31 19:50:00 +02:00
parent 0e48f74d0b
commit 3e3e35d1de
1 changed files with 1 additions and 1 deletions

View File

@ -2481,7 +2481,7 @@ void CBasePlayer::PostThink()
}
// Handle Tank controlling
if( m_pTank != NULL )
if( m_pTank && m_state == STATE_SPAWNED )
{
// if they've moved too far from the gun, or selected a weapon, unuse the gun
if( m_pTank->OnControls( pev ) && !pev->weaponmodel )