//Corpse overlayer class
class CorpseOv expands Overlay;

#exec OBJ LOAD FILE=Textures\NaliEffects.utx PACKAGE=NaliWeaponsII.GFX

var bool bPawn;

simulated function PostBeginPlay()
{
	if (Owner != None)
	{
		Mesh = Owner.Mesh;
		DrawScale = Owner.DrawScale;
	}		
}

simulated event Tick( float DeltaTime)
{
local Carcass C;

	if (bPawn && Pawn(Owner) != None)
	{
		if (Pawn(Owner).bHidden == True)
		{
			
			bPawn = False;
			SetOwner(None);
			ForEach RadiusActors( Class'Carcass', C, 10.0)
			{
				SetOwner(C);
				break;
			}
		}
	}

	if (Owner == None)
	{
		Destroy();
		return;
	}

	if (!bPawn)
		Fatness = Owner.Fatness;
	else
		Fatness = Owner.Fatness + 2;

	AnimSequence = Owner.AnimSequence;
	AnimFrame = Owner.AnimFrame;
	PrePivot = Owner.PrePivot;
	
	ScaleGlow = LifeSpan * Default.ScaleGlow / Default.LifeSpan;
}

defaultproperties
{
	bMeshEnviroMap=False
	bUnlit=True
	MultiSkins(0)=IonOverlay
	MultiSkins(1)=IonOverlay
	MultiSkins(2)=IonOverlay
	MultiSkins(3)=IonOverlay
	MultiSkins(4)=IonOverlay
	MultiSkins(5)=IonOverlay
	MultiSkins(6)=IonOverlay
	MultiSkins(7)=IonOverlay
	Skin=None
	Texture=None
	bTrailerPrepivot=True
	Physics=PHYS_Trailer
	ScaleGlow=2.000000
	bNetTemporary=True
	LifeSpan=2.000000
	bTrailerSameRotation=True
	bOwnerNoSee=True
	LightBrightness=100
	LightHue=191
	LightSaturation=13
	LightRadius=6
	LightEffect=LE_NonIncidence
	LightType=LT_Steady
}
