mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-13 23:28:04 +03:00
Fix crash when a func_tank owner dies. (reversing engineering mistake)
This commit is contained in:
parent
d23e133fd8
commit
b7bc2770be
@ -306,7 +306,7 @@ void CFuncTank::ControllerPostFrame()
|
||||
if (gpGlobals->time < m_flNextAttack)
|
||||
return;
|
||||
|
||||
if (m_pController != NULL && m_pController->pev->button & IN_ATTACK)
|
||||
if (m_pController->pev->button & IN_ATTACK)
|
||||
{
|
||||
Vector vecForward;
|
||||
UTIL_MakeVectorsPrivate(pev->angles, vecForward, NULL, NULL);
|
||||
@ -314,7 +314,7 @@ void CFuncTank::ControllerPostFrame()
|
||||
m_fireLast = gpGlobals->time - (1.0f / m_fireRate) - 0.01f;
|
||||
Fire(BarrelPosition(), vecForward, m_pController->pev);
|
||||
|
||||
if (m_pController->IsPlayer())
|
||||
if (m_pController && m_pController->IsPlayer())
|
||||
{
|
||||
m_pController->m_iWeaponVolume = LOUD_GUN_VOLUME;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user