//=============================================================================
// FlakShell.
//=============================================================================
class FlakShell expands Projectile;

#exec MESH IMPORT MESH=FlakSh ANIVFILE=MODELS\FlakSh_a.3D DATAFILE=MODELS\FlakSh_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=FlakSh X=0 Y=0 Z=-0 YAW=-64
#exec MESH SEQUENCE MESH=FlakSh SEQ=All    STARTFRAME=0   NUMFRAMES=1
#exec MESH SEQUENCE MESH=FlakSh SEQ=Still  STARTFRAME=0   NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Jflakshel1 FILE=MODELS\FlakShel.PCX
#exec MESHMAP SCALE MESHMAP=FlakSh X=0.12 Y=0.12 Z=0.24
#exec MESHMAP SETTEXTURE MESHMAP=FlakSh NUM=1 TEXTURE=Jflakshel1

	function PreBeginPlay()
	{
		CallParent.PreBeginPlay();
		Velocity = Vector(Rotation) * Speed;     
		Velocity.z += 200; 
	}
	
	simulated function BeginPlay()
	{
		SetTimer(0.1,True);		
	}

	function ProcessTouch (Actor Other, vector HitLocation)
	{
		if ((Other != instigator) && (FlakShell(Other) == none)) 
			Explode(HitLocation,Normal(HitLocation-Other.Location));
	}

	function Landed( vector HitNormal )
	{
		Explode(Location,HitNormal);
	}

	simulated function Timer()
	{
		if (Level.NetMode!=NM_Server) Spawn(class'SpriteSmokePuff');
	
	}

	function Explode(vector HitLocation, vector HitNormal)
	{
		HurtRadius(damage, 150, 'exploded', MomentumTransfer, HitLocation);	
 		Spawn( class'FlameExplosion',,,Location+HitNormal*10);
		Spawn(class 'Chunk1',,,Location+HitNormal*10);
		Spawn(class 'Chunk2',,,Location+HitNormal*10);
		Spawn(class 'Chunk3',,,Location+HitNormal*10);
		Spawn(class 'Chunk4',,,Location+HitNormal*10);
		Spawn(class 'Chunk1',,,Location+HitNormal*10);
		Spawn(class 'Chunk2',,,Location+HitNormal*10);
		Spawn(class 'Chunk3',,,Location+HitNormal*10);
		Spawn(class 'Chunk4',,,Location+HitNormal*10);
 		Destroy();
	}

