From 763c836d45d11f771b660c7186ab4b87e78383b6 Mon Sep 17 00:00:00 2001 From: Blixibon Date: Sun, 24 Jan 2021 22:32:22 -0600 Subject: [PATCH] Fixed a npc_zombie crash caused by inflictor-less crush damage --- sp/src/game/server/hl2/npc_zombie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp/src/game/server/hl2/npc_zombie.cpp b/sp/src/game/server/hl2/npc_zombie.cpp index dfb5d0cd..382e2dd2 100644 --- a/sp/src/game/server/hl2/npc_zombie.cpp +++ b/sp/src/game/server/hl2/npc_zombie.cpp @@ -908,7 +908,7 @@ bool CZombie::IsSquashed( const CTakeDamageInfo &info ) return false; } - if( info.GetDamageType() & DMG_CRUSH ) + if( info.GetDamageType() & DMG_CRUSH && info.GetInflictor() ) // Mapbase - Fixes a crash with inflictor-less crush damage { IPhysicsObject *pCrusher = info.GetInflictor()->VPhysicsGetObject(); if( pCrusher && pCrusher->GetMass() >= ZOMBIE_SQUASH_MASS && info.GetInflictor()->WorldSpaceCenter().z > EyePosition().z )