Compare commits

...

1 Commits

Author SHA1 Message Date
1724a7e754 Update physics_impact_damage.cpp 2025-01-03 22:31:11 +03:00

View File

@@ -255,6 +255,12 @@ float CalculatePhysicsImpactDamage( int index, gamevcollisionevent_t *pEvent, co
if ( pEvent->pEntities[0] == pEvent->pEntities[1] )
return 0;
if (pEvent->pEntities[otherIndex]->GetCollisionGroup() == COLLISION_GROUP_VEHICLE)
{
//Our friend is 100% vehicle, reassigning to the damage type.
damageType = DMG_VEHICLE;
}
if ( pEvent->pObjects[otherIndex]->GetGameFlags() & FVPHYSICS_NO_NPC_IMPACT_DMG )
{
if( pEvent->pEntities[index]->IsNPC() || pEvent->pEntities[index]->IsPlayer() )