Engine
Class InterpolationPoint

source: c:\runehov\Engine\Classes\InterpolationPoint.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Keypoint
         |
         +--Engine.InterpolationPoint
Direct Known Subclasses:CineInterpolationPoint

class InterpolationPoint
extends Engine.Keypoint

//============================================================================= // InterpolationPoint. //=============================================================================
Variables
 float FovModifier
           RUNE: Interpolate instantly to this point
 float GameSpeedModifier
           RUNE: Interpolate instantly to this point
 Prev, Next
           RUNE: Interpolate instantly to this point
 int Position
           RUNE: Interpolate instantly to this point
 float RateModifier
           RUNE: Interpolate instantly to this point
 vector ScreenFlashFog
           RUNE: Interpolate instantly to this point
 float ScreenFlashScale
           RUNE: Interpolate instantly to this point
 bool bEndOfPath
           RUNE: Interpolate instantly to this point
 bool bInterpInstant
           RUNE: Interpolate instantly to this point
 bool bSkipNextPath
           RUNE: Interpolate instantly to this point
 bool bSplineThruPoints
           RUNE: Interpolate instantly to this point


Function Summary
 void BeginPlay()
     
//
// At start of gameplay, link all matching interpolation points together.
//
 void InterpolateEnd(Actor Other)
     
//
// When reach an interpolation point.
//
 void PostBeginPlay()
     
//
// Verify that we're linked up.
//



Source Code


00001	//=============================================================================
00002	// InterpolationPoint.
00003	//=============================================================================
00004	class InterpolationPoint extends Keypoint
00005		native;
00006	
00007	// Sprite.
00008	#exec Texture Import File=Textures\IntrpPnt.pcx Name=S_Interp Mips=Off Flags=2
00009	
00010	var() bool bInterpInstant; // RUNE:  Interpolate instantly to this point
00011	
00012	// Number in sequence sharing this tag.
00013	var() int    Position;
00014	var() float  RateModifier;
00015	var() float  GameSpeedModifier;
00016	var() float  FovModifier;
00017	var() bool   bEndOfPath;
00018	var() bool   bSkipNextPath;
00019	var() float  ScreenFlashScale;
00020	var() vector ScreenFlashFog;
00021	var() bool   bSplineThruPoints;
00022	
00023	
00024	// Other points in this interpolation path.
00025	var InterpolationPoint Prev, Next;
00026	
00027	//
00028	// At start of gameplay, link all matching interpolation points together.
00029	//
00030	function BeginPlay()
00031	{
00032		local InterpolationPoint targIP;
00033	
00034		Super.BeginPlay();
00035	
00036		// Synchronize bSplineThruPoints in all matching interpolation points.
00037		if(Position == 0)
00038			foreach AllActors(class 'InterpolationPoint', targIP, Tag)
00039				targIP.bSplineThruPoints = bSplineThruPoints;
00040	
00041		// Try to find previous.
00042		foreach AllActors( class 'InterpolationPoint', Prev, Tag )
00043			if( Prev.Position == Position-1 )
00044				break;
00045		if( Prev != None )
00046			Prev.Next = Self;
00047	
00048		// Try to find next.
00049		foreach AllActors( class 'InterpolationPoint', Next, Tag )
00050			if( Next.Position == Position+1 )
00051				break;
00052		if( Next == None )
00053			foreach AllActors( class 'InterpolationPoint', Next, Tag )
00054				if( Next.Position == 0 )
00055					break;
00056		if( Next != None )
00057			Next.Prev = Self;
00058	}
00059	
00060	//
00061	// Verify that we're linked up.
00062	//
00063	function PostBeginPlay()
00064	{
00065		Super.PostBeginPlay();
00066		//log( "Interpolation point" @ Tag @ Position $ ":" );
00067		//if( Prev != None )
00068		//	log( "   Prev # " $ Prev.Position );
00069		//if( Next != None )
00070		//	log( "   Next # " $ Next.Position );
00071	}
00072	
00073	//
00074	// When reach an interpolation point.
00075	//
00076	function InterpolateEnd( actor Other )
00077	{
00078		if( bEndOfPath )	
00079		{
00080			if( Pawn(Other)!=None && Pawn(Other).bIsPlayer )
00081			{
00082				Other.bCollideWorld = True;
00083				Other.bInterpolating = false;
00084				if ( Pawn(Other).Health > 0 )
00085				{
00086					Other.SetCollision(true,true,true);
00087					Other.SetPhysics(PHYS_Falling);
00088					Other.AmbientSound = None;
00089					if ( Other.IsA('PlayerPawn') )
00090						Other.GotoState('PlayerWalking');
00091				}
00092			}
00093		}
00094	}
00095	
00096	defaultproperties
00097	{
00098	     RateModifier=1.000000
00099	     GameSpeedModifier=1.000000
00100	     FovModifier=1.000000
00101	     ScreenFlashScale=1.000000
00102	     bStatic=False
00103	     bDirectional=True
00104	     Texture=Texture'Engine.S_Interp'
00105	}

End Source Code