///////////////////////////////////////////////////////////////////////////////
// Spray ammo
///////////////////////////////////////////////////////////////////////////////
class Rips_SprayAmmoInv extends P2AmmoInv;



//var Sound ShockerHit;

///////////////////////////////////////////////////////////////////////////////
// Never switch at the end of an anim.
///////////////////////////////////////////////////////////////////////////////
simulated function bool HasAmmoFinished()
{
	return true;
}

///////////////////////////////////////////////////////////////////////////////
// Process a trace hitting something
///////////////////////////////////////////////////////////////////////////////
function ProcessTraceHit(Weapon W, Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
//	local SmokeHitPuffMachineGun smoke1;
//	local DirtClodsMachineGun dirt1;
//	local SparkHitMachineGun spark1;
	local Rotator NewRot;
	local Personcontroller pcont;

	if ( Other == None )
		return;

	if ( Pawn(Other) == None
		&& Other.bStatic)//Other.bWorldGeometry ) 
		{
		// randomly orient the splat on the wall (rotate around the normal)
		//NewRot = Rotator(-HitNormal);
		//NewRot.Roll=(65536*FRand());
		
		//Spawn(class'Fx.ShockerBurnSplat',,,HitLocation, NewRot);

//		smoke1 = Spawn(class'Fx.SmokeHitPuffMachineGun',,,HitLocation);
//		smoke1.FitToNormal(HitNormal);
//		if(FRand()<0.3)
//			{
//			dirt1 = Spawn(class'Fx.DirtClodsMachineGun',,,HitLocation);
//			dirt1.FitToNormal(HitNormal);
//			}
//		if(FRand()<0.3)
//			{
//			spark1 = Spawn(class'Fx.SparkHitMachineGun',,,HitLocation);
//			spark1.FitToNormal(HitNormal);
//			}
//			Instigator.PlayOwnedSound(ShockerHit, SLOT_Misc, 1.0);
		}
	
	
	if ( (Other != self) && (Other != Owner) ) 
		{
//		Instigator.PlayOwnedSound(ShockerHit, SLOT_Misc, 1.0);
		Other.TakeDamage(DamageAmount, Pawn(Owner), HitLocation, MomentumHitMag*X, DamageTypeInflicted);
		pcont = PersonController(Pawn(Other).Controller);

		// Make this guy throw up 
		if(pcont != None)
		{
			pcont.SetAttacker(Instigator);
			// definitely puke
			pcont.CheckToPuke(, true);
		}

		if(ShockerWeapon(Pawn(Owner).Weapon) != None
			&& Pawn(Other) != None)
			{
			//ShockerWeapon(Pawn(Owner).Weapon).MakeSparks();
//			ShockerWeapon(Pawn(Owner).Weapon).MakePawnLightning(Pawn(Other));
			}
		}

	//if ( Other.bWorldGeometry ) 
	//	Spawn(class'UT_HeavyWallHitEffect',,, HitLocation+HitNormal, Rotator(HitNormal));
	//else 
	//	if ( (Other != self) && (Other != Owner) ) 
	//	{
	//		if ( Pawn(Other) != None )
	//			Other.PlaySound(Sound 'ChunkHit',, 4.0,,100);
	//		else
	//			spawn(class'UT_SpriteSmokePuff',,,HitLocation+HitNormal*9);	
	//		Other.TakeDamage(20,  Pawn(Owner), HitLocation, 30000.0*X, Damage);	
	//	}
}


///////////////////////////////////////////////////////////////////////////////
// Default properties
///////////////////////////////////////////////////////////////////////////////

defaultproperties
{
//     ShockerHit=Sound'WeaponSounds.tazer_hit'
     DamageAmount=5.000000
     DamageTypeInflicted=Class'BaseFX.ChemDamage'
     MaxAmmo=100
     MaxAmmoMP=100
     bLeadTarget=True
     bInstantHit=True
     WarnTargetPct=0.200000
     RefireRate=0.990000
     Texture=Texture'RipsModTexV1.Icons.IconSpray'
}
