mirror of https://github.com/FWGS/hlsdk-xash3d
Prevent crash on tank and spectator
This commit is contained in:
parent
0e48f74d0b
commit
3e3e35d1de
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue