//=============================================================================
// HangingShopLight.
//=============================================================================
class HangingLightShoot extends HangingDecoration;

var TriggerLight L1;
var bool bHit;

simulated function PostPostBeginPlay()
{
	local triggerlight L;
	Super.PostPostBeginPlay();

	foreach allactors(class'TriggerLight',L)
	{
		if(L.Tag == Tag)
		{
			L1 = L;
		}
	}

	
}

auto state Active
{

function TakeDamage(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType)
{
	local DeusExFragment s;
	local int i;

	if(!bHit)
	{
		L1.Trigger(Self, EventInstigator);
		bHit = True;
		SetTimer(23, False);
		Skin = Texture'ContenderStuff.Skins.ShopLightTex7';
		MultiSkins[0] = Texture'ContenderStuff.Skins.ShopLightTex7';

		for (i=0 ; i<8 ; i++) 
		{
			s = DeusExFragment(Spawn(FragType, Owner));
			if (s != None)
			{
				s.Instigator = Instigator;
				s.CalcVelocity(Momentum,0);
				s.DrawScale = (	((CollisionRadius + CollisionHeight) / 40)*0.5+0.7*((CollisionRadius + CollisionHeight) / 40)*FRand()	);
				s.Skin = GetMeshTexture();
			}
		}
	}
}
}

Function Timer()
{
	bHit = False;
	L1.Trigger(Self, None);
	Skin = Default.Skin;
	MultiSkins[0] = Default.MultiSkins[0];
}

defaultproperties
{
     bHit=False
     bNoPitch=True
     bInvincible=True
     FragType=Class'DeusEx.GlassFragment'
     ItemName="Flourescent Light"
     Mesh=LodMesh'DeusExDeco.HangingShopLight'
     PrePivot=(Z=39.450001)
     CollisionRadius=42.500000
     CollisionHeight=39.450001
     Mass=30.000000
     Buoyancy=25.000000
}
