
class Helmet extends TournamentPickup;

#exec MESH IMPORT MESH=HelmetLPpkmesh ANIVFILE=MODELS\HelmetLPpkmesh_a.3d DATAFILE=MODELS\HelmetLPpkmesh_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=HelmetLPpkmesh STRENGTH=0.3
#exec MESH ORIGIN MESH=HelmetLPpkmesh X=0 Y=0 Z=0

#exec MESH SEQUENCE MESH=HelmetLPpkmesh SEQ=All STARTFRAME=0 NUMFRAMES=1

#exec MESHMAP NEW MESHMAP=HelmetLPpkmesh MESH=HelmetLPpkmesh
#exec MESHMAP SCALE MESHMAP=HelmetLPpkmesh X=0.3 Y=0.3 Z=0.6

#exec TEXTURE IMPORT NAME=BlackHelmetSkin_hp FILE=Textures\BlackHelmetSkin_hp.pcx GROUP=Skins
#exec TEXTURE IMPORT NAME=CamoHelmetSkin FILE=Textures\CamoHelmetSkin.pcx GROUP=Skins

event float BotDesireability(Pawn Bot)
{
  	local Helmet AlreadyHas;

  	AlreadyHas = Helmet(Bot.FindInventoryType(class));
  	if (AlreadyHas != None) return 0;
  	return 1.7;
}

function int ArmorAbsorbDamage(int Damage, name DamageType, vector HitLocation)
{
  	Local Int NewDamage;

  	If (Charge==0) Destroy();
  	if (DamageType!='Decapitated') Return Damage;
  	Else
  	{
    	Charge -= 1;
    	If (Damage <= 100) Return 0;
    	Else
    	{
      	NewDamage=(Damage / 2);
      	return NewDamage;
    	}
  	}
}

defaultproperties
{
	bCanHaveMultipleCopies=false
   PickupMessage="A Level 1 Ballistic Helmet"
   ItemName="Ballistic Helmet"
   PickupViewMesh=LodMesh'HelmetLPpkmesh'
   Texture=Texture'CamoHelmetSkin'
   Charge=25
   RespawnTime=9999.00
   ArmorAbsorption=75
   bIsAnArmor=True
   AbsorptionPriority=7
   MaxDesireability=1.70
   PickupSound=Sound'Botpack.Pickups.ArmorUT'
	RemoteRole=ROLE_SimulatedProxy
   Mesh=LodMesh'HelmetLPpkmesh'
   CollisionRadius=12.00
   CollisionHeight=12.0
   Physics=PHYS_Falling
	bRotatingPickup=False
}
