mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Fix player.cpp crash when m_pActiveItem = null
This commit is contained in:
parent
cc19972496
commit
2198176a13
@ -1330,10 +1330,11 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe
|
|||||||
if (pAttack->m_iTeam == m_iTeam && bAttackFFA)
|
if (pAttack->m_iTeam == m_iTeam && bAttackFFA)
|
||||||
flDamage *= 0.35;
|
flDamage *= 0.35;
|
||||||
|
|
||||||
iGunType = pAttack->m_pActiveItem->m_iId;
|
|
||||||
|
|
||||||
if (pAttack->m_pActiveItem)
|
if (pAttack->m_pActiveItem)
|
||||||
{
|
{
|
||||||
|
iGunType = pAttack->m_pActiveItem->m_iId;
|
||||||
|
|
||||||
flRatio += flShieldRatio;
|
flRatio += flShieldRatio;
|
||||||
switch (iGunType)
|
switch (iGunType)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user