//----------------------------------------------------------------------------- // Purpose: Returns how much damage the given ammo type should do to the victim // when fired by the attacker. // Input : pAttacker - Dude what shot the gun. // pVictim - Dude what done got shot. // nAmmoType - What been shot out. // Output : How much hurt to put on dude what done got shot (pVictim). //----------------------------------------------------------------------------- float CGameRules::GetAmmoDamage( CBaseEntity *pAttacker, CBaseEntity *pVictim, int nAmmoType ) { float flDamage = 0; CAmmoDef *pAmmoDef = GetAmmoDef(); if ( pAttacker->IsPlayer() ) { flDamage = pAmmoDef->PlrDamage( nAmmoType ); } else { flDamage = pAmmoDef->NPCDamage( nAmmoType ); } return flDamage; }