sp/src/game/shared/of2/of2_gamerules.cpp
//-----------------------------------------------------------------------------
// 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).
//-----------------------------------------------------------------------------
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).
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 COpposingForce2::GetAmmoDamage( CBaseEntity *pAttacker, CBaseEntity *pVictim, int nAmmoType )
	{
		float flDamage = 0.0f;
		CAmmoDef *pAmmoDef = GetAmmoDef();
			flDamage = BaseClass::GetAmmoDamage( pAttacker, pVictim, nAmmoType );
		if( pAttacker->IsPlayer() && pVictim->IsNPC() )
		{
			if( pVictim->MyCombatCharacterPointer() )
			{
				flDamage = pAmmoDef->PlrDamage( nAmmoType );
				flDamage = AdjustPlayerDamageInflicted( flDamage );
			}
		}
		return flDamage;
	}
float COpposingForce2 :: GetAmmoDamage ( CBaseEntity * pAttacker , CBaseEntity * pVictim , int nAmmoType ) { float flDamage = 0.0f ; CAmmoDef * pAmmoDef = GetAmmoDef ( ) ; flDamage = BaseClass :: GetAmmoDamage ( pAttacker , pVictim , nAmmoType ) ; if ( pAttacker -> IsPlayer ( ) && pVictim -> IsNPC ( ) ) { if ( pVictim -> MyCombatCharacterPointer ( ) ) { flDamage = pAmmoDef -> PlrDamage ( nAmmoType ) ; flDamage = AdjustPlayerDamageInflicted ( flDamage ) ; } } return flDamage ; }
Purpose: Returns how much damage the given ammo type should do to the victim
when fired by the attacker.
Purpose : Returns how much damage the given ammo type should do to the victim when fired by the attacker .
//if ( pAmmoDef->DamageType( nAmmoType ) & DMG_SNIPER ) //{ //	// If this damage is from a SNIPER, we do damage based on what the bullet //	// HITS, not who fired it. All other bullets have their damage values //	// arranged according to the owner of the bullet, not the recipient. //	if ( pVictim->IsPlayer() ) //	{ //		// Player //		flDamage = pAmmoDef->PlrDamage( nAmmoType ); //	} //	else //	{ //		// NPC or breakable //		flDamage = pAmmoDef->NPCDamage( nAmmoType ); //	} //} //else //{ //} // Player is shooting an NPC. Adjust the damage! This protects breakables // and other 'non-living' entities from being easier/harder to break // in different skill levels.