Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.InterpolationPoint


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
//=============================================================================
// InterpolationPoint.
//=============================================================================
class InterpolationPoint extends Keypoint
    native;

// Sprite.
#exec Texture Import File=Textures\IntrpPnt.pcx Name=S_Interp Mips=Off Flags=2

// Number in sequence sharing this tag.
var() int    Position;
var() float  RateModifier;
var() float  GameSpeedModifier;
var() float  FovModifier;
var() bool   bEndOfPath;
var() bool   bSkipNextPath;
var() float  ScreenFlashScale;
var() vector ScreenFlashFog;

// Other points in this interpolation path.
var InterpolationPoint Prev, Next;

//
// At start of gameplay, link all matching interpolation points together.
//
function BeginPlay()
{
    Super.BeginPlay();

    // Try to find previous.
    foreach AllActors( class 'InterpolationPoint', Prev, Tag )
        if( Prev.Position == Position-1 )
            break;
    if( Prev != None )
        Prev.Next = Self;

    // Try to find next.
    foreach AllActors( class 'InterpolationPoint', Next, Tag )
        if( Next.Position == Position+1 )
            break;
    if( Next == None )
        foreach AllActors( class 'InterpolationPoint', Next, Tag )
            if( Next.Position == 0 )
                break;
    if( Next != None )
        Next.Prev = Self;
}

//
// Verify that we're linked up.
//
function PostBeginPlay()
{
    Super.PostBeginPlay();
    //log( "Interpolation point" @ Tag @ Position $ ":" );
    //if( Prev != None )
    //	log( "   Prev # " $ Prev.Position );
    //if( Next != None )
    //	log( "   Next # " $ Next.Position );
}

//
// When reach an interpolation point.
//
function InterpolateEnd( actor Other )
{
    if( bEndOfPath )    
    {
        if( Pawn(Other)!=None && Pawn(Other).bIsPlayer )
        {
            Other.bCollideWorld = True;
            Other.bInterpolating = false;
            if ( Pawn(Other).Health > 0 )
            {
                Other.SetCollision(true,true,true);
                Other.SetPhysics(PHYS_Falling);
                Other.AmbientSound = None;
                if ( Other.IsA('PlayerPawn') )
                    Other.GotoState('PlayerWalking');
            }
        }
    }
}

defaultproperties
{
     RateModifier=1.000000
     GameSpeedModifier=1.000000
     FovModifier=1.000000
     ScreenFlashScale=1.000000
     bStatic=False
     bDirectional=True
     Texture=Texture'Engine.S_Interp'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:27:48.000 - Creation time: za 22-4-2006 13:29:28.562 - Created with UnCodeX