Fix player.cpp crash when m_pActiveItem = null

This commit is contained in:
IgnacioDM 2016-01-06 06:09:50 -03:00
parent cc19972496
commit 2198176a13

View File

@ -1330,10 +1330,11 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
if (pAttack->m_iTeam == m_iTeam && bAttackFFA)
flDamage *= 0.35;
iGunType = pAttack->m_pActiveItem->m_iId;
if (pAttack->m_pActiveItem)
{
iGunType = pAttack->m_pActiveItem->m_iId;
flRatio += flShieldRatio;
switch (iGunType)
{