From 3e3e35d1def900e630607fe6200346ec95767c30 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sat, 31 Dec 2016 19:50:00 +0200 Subject: [PATCH] Prevent crash on tank and spectator --- dlls/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/player.cpp b/dlls/player.cpp index bffc3647..84c20ad8 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -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 )