//=============================================================================
// UDamage.
//=============================================================================
class UDamage expands Pickup;

#exec AUDIO IMPORT FILE="Sounds\Pickups\activ1.WAV" NAME="UDActiv" GROUP="Pickups"
#exec AUDIO IMPORT FILE="Sounds\Pickups\deactiv1.WAV" NAME="UDDeactiv" GROUP="Pickups"
#exec AUDIO IMPORT FILE="Sounds\Pickups\pickup1.WAV" NAME="UDPickup" GROUP="Pickups"

#exec TEXTURE IMPORT NAME=I_UDamage FILE=TEXTURES\HUD\i_udamage.PCX GROUP="Icons" MIPS=OFF

#exec MESH IMPORT MESH=udamage ANIVFILE=MODELS\udamage_a.3d DATAFILE=MODELS\udamage_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=udamage X=0 Y=0 Z=0
#exec MESH SEQUENCE MESH=udamage SEQ=All     STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=udamage SEQ=Udamage STARTFRAME=0 NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Judamage1 FILE=MODELS\udamage1.PCX GROUP=Skins FLAGS=2 // Material #2
#exec MESHMAP NEW   MESHMAP=udamage MESH=udamage
#exec MESHMAP SCALE MESHMAP=udamage X=0.1 Y=0.1 Z=0.2
#exec MESHMAP SETTEXTURE MESHMAP=udamage NUM=1 TEXTURE=Judamage1

//
// Player has activated the item, pump up their damage.
//
state Activated
{
	function Timer()
	{
		Charge -= 1;
		if (Charge <= 0) {
			SetTimer(0.0,False);
			if ( Owner != None )
			{
				Owner.PlaySound(DeActivateSound);
				Pawn(Owner).DamageScaling = 1.0;
			}
			UsedUp();
		}
	}

	function EndState()
	{
		bActive = false;
	}

Begin:
	SetTimer(0.1,True);
	Owner.PlaySound(ActivateSound);	
	Pawn(Owner).DamageScaling = 4.0;	
}

state DeActivated
{
Begin:
	if ( Owner != None )
	{
		Owner.PlaySound(DeActivateSound);
		Pawn(Owner).DamageScaling = 1.0;
	}
}

defaultproperties
{
	 ItemName="Mark of Chizra"
     MaxDesireability=2.000000
     bAutoActivate=True
     bActivatable=True
     bDisplayableInv=True
     PickupMessage="You got the Mark of Chizra!"
     RespawnTime=120.000000
     PickupViewMesh=Mesh'BotPack.UDamage'
     PickupViewScale=0.500000
     Charge=300
     PickupSound=Sound'Botpack.Pickups.UDActiv'
     ActivateSound=Sound'Botpack.Pickups.UDDeactiv'
     DeActivateSound=Sound'Botpack.Pickups.UDPickup'
     Physics=PHYS_Rotating
     RemoteRole=ROLE_DumbProxy
     Mesh=Mesh'BotPack.UDamage'
     DrawScale=0.500000
     Icon=Texture'BotPack.Icons.I_UDamage'
}
