Core.Object | +--Engine.Actor | +--Engine.Keypoint | +--Engine.InterpolationPoint
float
FovModifier
GameSpeedModifier
Prev,
Next
int
Position
RateModifier
vector
ScreenFlashFog
ScreenFlashScale
bool
bEndOfPath
bSkipNextPath
void
BeginPlay()
// // At start of gameplay, link all matching interpolation points together. //
InterpolateEnd(Actor Other)
// // When reach an interpolation point. //
PostBeginPlay()
// // Verify that we're linked up. //
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 // Number in sequence sharing this tag. 00011 var() int Position; 00012 var() float RateModifier; 00013 var() float GameSpeedModifier; 00014 var() float FovModifier; 00015 var() bool bEndOfPath; 00016 var() bool bSkipNextPath; 00017 var() float ScreenFlashScale; 00018 var() vector ScreenFlashFog; 00019 00020 // Other points in this interpolation path. 00021 var InterpolationPoint Prev, Next; 00022 00023 // 00024 // At start of gameplay, link all matching interpolation points together. 00025 // 00026 function BeginPlay() 00027 { 00028 Super.BeginPlay(); 00029 00030 // Try to find previous. 00031 foreach AllActors( class 'InterpolationPoint', Prev, Tag ) 00032 if( Prev.Position == Position-1 ) 00033 break; 00034 if( Prev != None ) 00035 Prev.Next = Self; 00036 00037 // Try to find next. 00038 foreach AllActors( class 'InterpolationPoint', Next, Tag ) 00039 if( Next.Position == Position+1 ) 00040 break; 00041 if( Next == None ) 00042 foreach AllActors( class 'InterpolationPoint', Next, Tag ) 00043 if( Next.Position == 0 ) 00044 break; 00045 if( Next != None ) 00046 Next.Prev = Self; 00047 } 00048 00049 // 00050 // Verify that we're linked up. 00051 // 00052 function PostBeginPlay() 00053 { 00054 Super.PostBeginPlay(); 00055 //log( "Interpolation point" @ Tag @ Position $ ":" ); 00056 //if( Prev != None ) 00057 // log( " Prev # " $ Prev.Position ); 00058 //if( Next != None ) 00059 // log( " Next # " $ Next.Position ); 00060 } 00061 00062 // 00063 // When reach an interpolation point. 00064 // 00065 function InterpolateEnd( actor Other ) 00066 { 00067 if( bEndOfPath ) 00068 { 00069 if( Pawn(Other)!=None && Pawn(Other).bIsPlayer ) 00070 { 00071 Other.bCollideWorld = True; 00072 Other.bInterpolating = false; 00073 if ( Pawn(Other).Health > 0 ) 00074 { 00075 Other.SetCollision(true,true,true); 00076 Other.SetPhysics(PHYS_Falling); 00077 Other.AmbientSound = None; 00078 if ( Other.IsA('PlayerPawn') ) 00079 Other.GotoState('PlayerWalking'); 00080 } 00081 } 00082 } 00083 } 00084 00085 defaultproperties 00086 { 00087 RateModifier=1.000000 00088 GameSpeedModifier=1.000000 00089 FovModifier=1.000000 00090 ScreenFlashScale=1.000000 00091 bStatic=False 00092 bDirectional=True 00093 Texture=Texture'Engine.S_Interp' 00094 }