//=============================================================================
// SuperHealth.
//=============================================================================
class SuperHealth expands Health;

#exec MESH IMPORT MESH=SuperHealthMesh ANIVFILE=MODELS\sheal_a.3D DATAFILE=MODELS\sheal_d.3D X=0 Y=0 Z=0
#exec  MESH ORIGIN MESH=SuperHealthMesh X=0 Y=0 Z=0 ROLL=128
#exec  MESH SEQUENCE MESH=SuperHealthMesh SEQ=All    STARTFRAME=0  NUMFRAMES=1
#exec  TEXTURE IMPORT NAME=Jshealth1 FILE=MODELS\shealth.PCX GROUP="Skins" 
#exec OBJ LOAD FILE=Textures\WaterEffect1.utx  PACKAGE=UNREALI
#exec  MESHMAP SCALE MESHMAP=SuperHealthMesh X=0.04 Y=0.04 Z=0.08
#exec  MESHMAP SETTEXTURE MESHMAP=SuperHealthMesh NUM=1 TEXTURE=Jshealth1
#exec  MESHMAP SETTEXTURE MESHMAP=SuperHealthMesh NUM=0 TEXTURE=WaterEffect1


auto state Pickup
{	
	function Touch( actor Other )
	{
		local int HealMax;
		local string[70] HealthMessage;
		if ( ValidTouch(Other) )
		{
			HealMax = Pawn(Other).default.health * 2;
			if (Pawn(Other).Health < HealMax) 
			{
				Pawn(Other).Health += HealingAmount;
				if (Pawn(Other).Health > HealMax) Pawn(Other).Health = HealMax;
				Pawn(Other).ClientMessage(PickupMessage);				
				PlaySound (PickupSound);			
				if ( Level.Game.Difficulty > 1 )
					MakeNoise(0.1 * Level.Game.Difficulty);		
				SetRespawn();
			}
		}
	}
}

