mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-27 23:35:30 +03:00
Fixed a npc_zombie crash caused by inflictor-less crush damage
This commit is contained in:
parent
f484653f41
commit
763c836d45
@ -908,7 +908,7 @@ bool CZombie::IsSquashed( const CTakeDamageInfo &info )
|
|||||||
return false;
|
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();
|
IPhysicsObject *pCrusher = info.GetInflictor()->VPhysicsGetObject();
|
||||||
if( pCrusher && pCrusher->GetMass() >= ZOMBIE_SQUASH_MASS && info.GetInflictor()->WorldSpaceCenter().z > EyePosition().z )
|
if( pCrusher && pCrusher->GetMass() >= ZOMBIE_SQUASH_MASS && info.GetInflictor()->WorldSpaceCenter().z > EyePosition().z )
|
||||||
|
Loading…
Reference in New Issue
Block a user