class NeoXSuperHealth expands HealthPack;

#exec MESH IMPORT MESH=NeoXSuperHealth ANIVFILE=MODELS\NeoXSuperHealth_a.3d DATAFILE=MODELS\NeoXSuperHealth_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=NeoXSuperHealth STRENGTH=0
#exec MESH ORIGIN MESH=NeoXSuperHealth X=0 Y=0 Z=0 YAW=64

#exec MESH SEQUENCE MESH=NeoXSuperHealth SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=NeoXSuperHealth SEQ=Still STARTFRAME=0 NUMFRAMES=1

#exec MESHMAP NEW MESHMAP=NeoXSuperHealth MESH=NeoXSuperHealth
#exec MESHMAP SCALE MESHMAP=NeoXSuperHealth X=0.04 Y=0.04 Z=0.08

#exec TEXTURE IMPORT NAME=Glass FILE=SKINS\Glass.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=NeoXSuperHealth NUM=1 TEXTURE=Glass

#exec MESHMAP SETTEXTURE MESHMAP=NeoXSuperHealth NUM=2 TEXTURE=SuperElectric02
#exec MESHMAP SETTEXTURE MESHMAP=NeoXSuperHealth NUM=3 TEXTURE=KamiOverFX
#exec MESHMAP SETTEXTURE MESHMAP=NeoXSuperHealth NUM=4 TEXTURE=KamiOverFX

#exec TEXTURE IMPORT NAME=ShineMetalC FILE=SKINS\ShineMetalC.bmp GROUP=Skins FLAGS=2 LODSET=2

#exec AUDIO IMPORT NAME="NeoXSuperH" FILE=SOUNDS\NeoXSuperH.wav GROUP="NeoXPickups"


simulated function PostBeginPlay()
{
	Super.PostBeginPlay();

	if (Role == ROLE_Authority)
	{
		if (!Class'NWMutator'.default.bPickupsDynLight)
			LightType = LT_None;
	}
	SpawnOv();
	LODBias = Class'NWMutator'.default.PickupsDistDetail * 8/255;
}

simulated function SpawnOv()
{
	Spawn(Class'NeoXSHControl', Self);
	Spawn(Class'NeoXSHSupports', Self);
}


auto state Pickup
{	
	function Touch( actor Other )
	{
		local int HealMax;
		local Pawn P;
			
		if ( ValidTouch(Other) ) 
		{	
			P = Pawn(Other);

			if ((Level.Game.IsA('MonsterHunt') && Class'NWMutator'.Default.EnableMonsterHuntMode && Class'NWMutator'.Default.MonsterHuntOnly) || (Class'NWMutator'.Default.EnableMonsterHuntMode && !Class'NWMutator'.Default.MonsterHuntOnly))
			{
				HealMax = Class'NwMutator'.Default.MaxHealth;

				if (P.Health < HealMax) 
				{
					if (Level.Game.LocalLog != None)
						Level.Game.LocalLog.LogPickup(Self, P);
					if (Level.Game.WorldLog != None)
						Level.Game.WorldLog.LogPickup(Self, P);
					P.Health += HealingAmount;
					if (P.Health > HealMax) P.Health = HealMax;
					PlayPickupMessage(P);
					PlaySound (PickupSound,,2.5);
					Other.MakeNoise(0.2);		
					SetRespawn();
				}
			}
			else
				Super.Touch(Other);
		}
	}
}


defaultproperties
{
	DrawType=DT_Mesh
	Mesh=NeoXSuperHealth
	Texture=ShineMetalC
	LightBrightness=100
	LightHue=0
	LightSaturation=0
	LightRadius=6
	LightType=LT_Steady
	HealingAmount=200
	ScaleGlow=2.000000
	PickupSound=NeoXSuperH
	PickupMessage="You picked up a NeoX Super Health +"
	PickupViewMesh=NeoXSuperHealth
	DrawScale=1.000000
	PickupViewScale=1.000000
}
