UnrealShare
Class SeekingRocket

source: e:\games\UnrealTournament\UnrealShare\Classes\SeekingRocket.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Projectile
         |
         +--UnrealShare.rocket
            |
            +--UnrealShare.SeekingRocket
Direct Known Subclasses:None

class SeekingRocket
extends UnrealShare.rocket

//============================================================================= // SeekingRocket. //=============================================================================
States
Flying

Function Summary
 
simulated
PostBeginPlay()
 void Timer()


State Flying Function Summary
 void BeginState()



Source Code


00001	//=============================================================================
00002	// SeekingRocket.
00003	//=============================================================================
00004	class SeekingRocket extends rocket;
00005	
00006	simulated function PostBeginPlay()
00007	{
00008		Count = -0.1;
00009		if (Level.bHighDetailMode) SmokeRate = 0.035;
00010		else SmokeRate = 0.15;
00011	}
00012	
00013	function Timer()
00014	{
00015		local vector SeekingDir;
00016	
00017		If (Seeking != None  && Seeking != Instigator) 
00018		{
00019			SeekingDir = Normal(Seeking.Location - Location);
00020			if ( (SeekingDir Dot InitialDir) > 0 )
00021			{
00022				MagnitudeVel = VSize(Velocity);
00023				Velocity =  MagnitudeVel * Normal(SeekingDir * 0.47 * MagnitudeVel + Velocity);		
00024				SetRotation(rotator(Velocity));
00025			}
00026		}
00027	}
00028	
00029	auto state Flying
00030	{
00031		function BeginState()
00032		{	
00033			SetTimer(0.15,True);
00034			Super.BeginState();
00035		}
00036	}	
00037	
00038	defaultproperties
00039	{
00040	     bNetTemporary=False
00041	     RemoteRole=ROLE_DumbProxy
00042	     LifeSpan=10.000000
00043	     LightBrightness=182
00044	     LightHue=27
00045	     LightSaturation=75
00046	     LightRadius=8
00047	     bCorona=False
00048	}

End Source Code