RuneI
Class SpiderBomb

source: c:\runehov\RuneI\Classes\SpiderBomb.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Projectile
         |
         +--RuneI.SpiderBomb
Direct Known Subclasses:None

class SpiderBomb
extends Engine.Projectile

//============================================================================= // SpiderBomb. //=============================================================================
Variables
 Actor TorchFire


Function Summary
 
simulated
Explode(vector HitLocation, vector HitNormal)
 
simulated
Landed(vector HitNormal, Actor HitActor)
 
simulated
PostBeginPlay()
 
simulated
ProcessTouch(Actor Other, Vector HitLocation)



Source Code


00001	//=============================================================================
00002	// SpiderBomb.
00003	//=============================================================================
00004	class SpiderBomb expands Projectile;
00005	
00006	var Actor TorchFire;
00007	
00008	simulated function PostBeginPlay()
00009	{
00010		Super.PostBeginPlay();
00011	
00012		// Spawn fire on the torch
00013		TorchFire = Spawn(class'trailfire',,, Owner.Location,);
00014		
00015		AttachActorToJoint(TorchFire, JointNamed('offset'));
00016	}
00017	
00018	simulated function ProcessTouch(Actor Other, Vector HitLocation)
00019	{
00020		if(Other.IsA('Weapon'))
00021			return;
00022			
00023		Other.JointDamaged(Damage, Pawn(Owner), HitLocation, Velocity * 0.5, 'fire', 0);
00024		Explode(HitLocation, vect(0, 0, 0));
00025	}
00026	
00027	simulated function Landed(vector HitNormal, actor HitActor)
00028	{
00029		Explode(Location, HitNormal);
00030	}
00031	
00032	simulated function Explode(vector HitLocation, vector HitNormal)
00033	{
00034		if(TorchFire != None)
00035		{
00036			TorchFire.Destroy();
00037		}
00038		
00039		Destroy();
00040	}
00041	
00042	defaultproperties
00043	{
00044	     Damage=6.000000
00045	     DrawType=DT_SkeletalMesh
00046	     DrawScale=1.250000
00047	     AmbientGlow=50
00048	     Skeletal=SkelModel'objects.Rocks'
00049	}

End Source Code