Merge pull request #9 from IgnacioFDM/patch-1

Fix player.cpp crash when m_pActiveItem = null
This commit is contained in:
s1lentq 2016-01-06 15:08:23 +03:00
commit 60de5f5ecf

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)
{