///////////////////////////////////////////////////////////////////////////////
// In gun ammo
///////////////////////////////////////////////////////////////////////////////
class Rips_MachineGunBulletAmmoInv extends P2AmmoInv;

const FLESH_HIT_MAX	=	4;

var Sound FleshHit[FLESH_HIT_MAX];
var float FleshRad;

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
function ProcessTraceHit(Weapon W, Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
	local Rotator NewRot;

	if ( Other == None )
		return;

	if(Other.bStatic)
	{
		spawn(class'Rips_MachineGunBulletHitPack',W.Owner, ,HitLocation, Rotator(HitNormal));
	}
	else 
	{
		Other.TakeDamage(DamageAmount, Pawn(Owner), HitLocation, MomentumHitMag*X, DamageTypeInflicted);

		if((Pawn(Other) != None && Other != Owner)
			|| PeoplePart(Other) != None
			|| CowheadProjectile(Other) != None)
		{
			Other.PlaySound(FleshHit[Rand(ArrayCount(FleshHit))],SLOT_Pain,,,FleshRad,GetRandPitch());
		}
		else // anything else--make a spark hit
		{
			spawn(class'BulletSparkPack',W.Owner, ,HitLocation, Rotator(HitNormal));
		}
	}
}

defaultproperties
{
     FleshHit(0)=Sound'RipsModSoundV1.hit1'
     FleshHit(1)=Sound'RipsModSoundV1.hit2'
     FleshHit(2)=Sound'RipsModSoundV1.hit3'
     FleshHit(3)=Sound'RipsModSoundV1.hit4'
     FleshRad=200.000000
     DamageAmount=8.000000
     MomentumHitMag=50000.000000
     DamageTypeInflicted=Class'RipsModV1.Rips_MachineGunDamage'
     DamageAmountMP=10.000000
     MaxAmmoMP=200
     MaxAmmo=400
     bLeadTarget=True
     bInstantHit=True
     WarnTargetPct=0.200000
     RefireRate=0.990000
     PickupClass=Class'RipsModV1.Rips_MachineGunAmmoPickup'
     Texture=Texture'RipsModTexV1.Icons.IconMGun'
}
