//=============================================================================
// - UTEW_ShockCore.
//=============================================================================
class UTEW_ShockCore expands TournamentAmmo;

#exec TEXTURE IMPORT NAME=EWJShockCore FILE=Textures\EWJShockCore.bmp GROUP="Skins" LODSET=2

var(Display) Texture MultiSkinUTEW[8];

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

state Pickup
{
	simulated function BeginState()
	{
		Super.BeginState();
		SetPickupSkins();
	}
}

simulated function SetOwnerDisplay()
{
	Super.SetOwnerDisplay();
	SetPickupSkins();
}

simulated function BecomeItem()
{
	Super.BecomeItem();
	SetPickupSkins();
}

simulated function BecomePickup()
{
	Super.BecomePickup();
	SetPickupSkins();
}

simulated function RenderOverlays( canvas Canvas )
{
	if ( PlayerPawn(Owner) != None && PlayerPawn(Owner).ViewTarget == None && !PlayerPawn(Owner).bBehindView )
		SetViewSkins();
	Super.RenderOverlays(Canvas);
	SetPickupSkins();
}

simulated function SetPickupSkins()
{
	if ( Level.NetMode == NM_DedicatedServer )
		return;

	MultiSkins[0] = Default.MultiSkins[0];
	MultiSkins[1] = Default.MultiSkins[1];
	MultiSkins[2] = Default.MultiSkins[2];
	MultiSkins[3] = Default.MultiSkins[3];
	MultiSkins[4] = Default.MultiSkins[4];
	MultiSkins[5] = Default.MultiSkins[5];
	MultiSkins[6] = Default.MultiSkins[6];
}

simulated function SetViewSkins()
{
	if ( Level.NetMode == NM_DedicatedServer )
		return;
	if ( Owner == None )
		SetPickupSkins();

	MultiSkins[0] = MultiSkinUTEW[0];
	MultiSkins[1] = MultiSkinUTEW[1];
	MultiSkins[2] = MultiSkinUTEW[2];
	MultiSkins[3] = MultiSkinUTEW[3];
	MultiSkins[4] = MultiSkinUTEW[4];
	MultiSkins[5] = MultiSkinUTEW[5];
	MultiSkins[6] = MultiSkinUTEW[6];
}

defaultproperties
{
     Physics=PHYS_Falling
     PickupViewScale=1.0
     AmmoAmount=10
     MaxAmmo=50
     UsedInWeaponSlot(4)=1
     PickupMessage="You picked up a UTEW Shock Core."
     ItemName="UTEW Shock Core"
     PickupViewMesh=LodMesh'BotPack.ShockCoreM'
     Mesh=LodMesh'BotPack.ShockCoreM'
     MultiSkins(0)=Texture'EWJShockCore'
     MultiSkins(1)=Texture'EWJShockCore'
     MultiSkins(2)=Texture'EWJShockCore'
     MultiSkins(3)=Texture'EWJShockCore'
     CollisionRadius=14.000000
     CollisionHeight=20.000000
     bMeshCurvy=False
     SoundRadius=26
     SoundVolume=37
     SoundPitch=73
     bCollideActors=True
}
