Botpack
Class UTFlakShell

source: e:\games\UnrealTournament\Botpack\Classes\UTFlakShell.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Projectile
         |
         +--Botpack.UTFlakShell
Direct Known Subclasses:MortarShell

class UTFlakShell
extends Engine.Projectile

//============================================================================= // UTFlakShell. //=============================================================================

Function Summary
 void Explode(vector HitLocation, vector HitNormal)
 void Landed(vector HitNormal)
 
simulated
PostBeginPlay()
 void ProcessTouch(Actor Other, vector HitLocation)
 
simulated
Timer()



Source Code


00001	//=============================================================================
00002	// UTFlakShell.
00003	//=============================================================================
00004	class UTFlakShell extends Projectile;
00005	
00006	simulated function PostBeginPlay()
00007	{
00008		Super.PostBeginPlay();
00009		Velocity = Vector(Rotation) * Speed;     
00010		Velocity.z += 200; 
00011		if ( Level.bHighDetailMode  && !Level.bDropDetail ) 
00012			SetTimer(0.05,True);
00013		else 
00014			SetTimer(0.25,True);
00015	}
00016	
00017	function ProcessTouch (Actor Other, vector HitLocation)
00018	{
00019		if ( Other != instigator ) 
00020			Explode(HitLocation,Normal(HitLocation-Other.Location));
00021	}
00022	
00023	function Landed( vector HitNormal )
00024	{
00025		Explode(Location,HitNormal);
00026	}
00027	
00028	simulated function Timer()
00029	{
00030		local ut_SpriteSmokePuff s;
00031	
00032		if (Level.NetMode!=NM_DedicatedServer) 
00033		{
00034			s = Spawn(class'ut_SpriteSmokePuff');
00035			s.RemoteRole = ROLE_None;
00036		}	
00037	}
00038	
00039	function Explode(vector HitLocation, vector HitNormal)
00040	{
00041		local vector start;
00042	
00043		HurtRadius(damage, 150, 'FlakDeath', MomentumTransfer, HitLocation);	
00044		start = Location + 10 * HitNormal;
00045	 	Spawn( class'FlameExplosion',,,Start);
00046		Spawn( class 'UTChunk2',, '', Start);
00047		Spawn( class 'UTChunk3',, '', Start);
00048		Spawn( class 'UTChunk4',, '', Start);
00049		Spawn( class 'UTChunk1',, '', Start);
00050	 	Destroy();
00051	}
00052	
00053	defaultproperties
00054	{
00055	     speed=1200.000000
00056	     Damage=70.000000
00057	     MomentumTransfer=75000
00058	     ExplosionDecal=Class'Botpack.BlastMark'
00059	     bNetTemporary=False
00060	     Physics=PHYS_Falling
00061	     RemoteRole=ROLE_SimulatedProxy
00062	     LifeSpan=6.000000
00063	     Mesh=LodMesh'UnrealI.FlakSh'
00064	     AmbientGlow=67
00065	     bUnlit=True
00066	}

End Source Code