
class AdrenShot extends TournamentPickup;

#exec mesh import mesh=hypodermic anivfile=Models\hypodermic_a.3d datafile=Models\hypodermic_d.3d x=0 y=0 z=0 mlod=0
#exec mesh origin mesh=hypodermic x=0 y=0 z=-2 PITCH=64 ROLL=32 YAW=0
#exec mesh sequence mesh=hypodermic seq=All startframe=0 numframes=1

#exec meshmap new meshmap=hypodermic mesh=hypodermic
#exec meshmap scale meshmap=hypodermic x=0.07422 y=0.07422 z=0.1484

#exec TEXTURE IMPORT NAME=chromy 		FILE=Textures\chromy.BMP 		GROUP=Skins
#exec TEXTURE IMPORT NAME=AdrenLabel 	FILE=Textures\AdrenLabel.BMP 	GROUP=Skins
#exec AUDIO IMPORT NAME=HypoShot 		FILE=Sounds\HypoShot.wav

var() int HealingAmount;

state Activated
{
   function endstate()
   {
      bActive = false;
      SetTimer(0.0, False);
   }

   function Timer()
   {
      local int HealMax;
      local Pawn P;

		if (Charge>0)
      	Charge -= 1;
		if (Charge<=0)
         UsedUp();
		if (Owner != none)
		{
      	P = Pawn(Owner);
      	HealMax = P.default.health;
      	if (P.Health < HealMax)
      	{
         	P.Health += HealingAmount;
         	if (P.Health > HealMax)
					P.Health = HealMax;
      	}
   	}
   }
   function BeginState()
   {
      bActive = true;
      PlaySound(ActivateSound,,4.0);
      SetTimer(1.0,True);
   }
}

state DeActivated
{
Begin:
}

defaultproperties
{
	bCanHaveMultipleCopies=false
	Physics=PHYS_Falling
	DrawType=DT_Mesh
	Mesh=Mesh'hypodermic'
	CollisionRadius=8.00000
	CollisionHeight=6.00000
	MultiSkins(0)=Texture'GrungyWhite'
	MultiSkins(1)=Texture'UnrealI.Effect26.fireeffect26'
	MultiSkins(2)=Texture'AdrenLabel'
	MultiSkins(3)=Texture'chromy'
	RemoteRole=ROLE_DumbProxy
	HealingAmount=15
   ExpireMessage="Adrenaline is used up"
   bAutoActivate=True
   bActivatable=True
   PickupMessage="You took andrenaline!"
   ItemName="Adrenaline"
   Charge=10
   MaxDesireability=1.200000
   ActivateSound=none
   bRotatingPickup=False
   RespawnTime=120.00
   PickupViewMesh=Mesh'hypodermic'
   PickupSound=Sound'HypoShot'
}