[Warp] Fix crash on damage event

This commit is contained in:
TotallyNotElite 2020-06-13 00:11:14 +02:00
parent 411ffb8383
commit 6e740be0f3

View File

@ -530,7 +530,7 @@ public:
if (g_IEngine->GetPlayerForUserID(victim) != g_pLocalPlayer->entity_idx)
return;
// Ignore projectiles for now
if (GetWeaponMode(ENTITY(attacker)) == weapon_projectile)
if (CE_VALID(ENTITY(attacker)) && GetWeaponMode(ENTITY(attacker)) == weapon_projectile)
return;
// We got hurt
was_hurt = true;