Core.Object | +--Engine.Actor | +--Engine.Pawn | +--Engine.PlayerPawn | +--UMS1_6.MoviePlayer
BlackColour,
ColourChange
float
DesiredFadeTime
FadeScale
CurrentFadeTime,
TimeChange
bFade,
bFadingOut
bool
bInteractiveMode
void
Fire(optional float)
//First, we make sure that the MoviePlayer can't do anything //I'm not sure how much of this code really needs to be here, but I //am just going to leave well enough alone since it works
InitPlayerReplicationInfo()
BeginState()
EndState()
PlayerMove(float DeltaTime)
ServerMove(float TimeStamp, vector Accel, vector ClientLoc, bool NewbRun, bool NewbDuck, bool NewbJumpStatus, bool bFired, bool bAltFired, bool bForceFire, bool bForceAltFire, eDodgeDir DodgeMove, byte ClientRoll, int View, optional byte, optional int)
ProcessMove(float DeltaTime, vector NewAccel, eDodgeDir DodgeMove, rotator DeltaRot)
PostBeginPlay()
Possess()
// This pawn was possessed by a player.
RestartLevel()
//============================================================================= // functions.
00001 //============================================================================= 00002 // MoviePlayer. 00003 //============================================================================= 00004 class MoviePlayer expands PlayerPawn; 00005 00006 //Used for fading 00007 var bool bInteractiveMode; 00008 var bool bFade, bFadingOut; 00009 var float DesiredFadeTime; 00010 var float CurrentFadeTime, TimeChange; 00011 var vector FadeColor, BlackColour, ColourChange; 00012 var float FadeScale; 00013 00014 //First, we make sure that the MoviePlayer can't do anything 00015 //I'm not sure how much of this code really needs to be here, but I 00016 //am just going to leave well enough alone since it works 00017 00018 exec function Fire( optional float F ) 00019 { 00020 local Director D; 00021 local Rotator R; 00022 foreach AllActors(class 'Director', D) 00023 D.bRolling = false; 00024 00025 ClientMessage("Entering Walking State"); 00026 GotoState('TestState1'); 00027 } 00028 00029 function InitPlayerReplicationInfo() 00030 { 00031 Super.InitPlayerReplicationInfo(); 00032 PlayerReplicationInfo.bIsSpectator = false; 00033 bInteractiveMode=true; 00034 } 00035 00036 state TestState1 00037 { 00038 exec function Fire( optional float F ) { 00039 ClientMessage("1->2"); 00040 GotoState('TestState2'); 00041 } 00042 } 00043 00044 state TestState2 00045 { 00046 exec function Fire( optional float F ) { 00047 ClientMessage("2->1"); 00048 GotoState('TestState1'); 00049 } 00050 } 00051 00052 state WalkingState 00053 { 00054 exec function Fire( optional float F ) 00055 { 00056 local Director D; 00057 local Rotator R; 00058 foreach AllActors(class 'Director', D) 00059 D.bRolling = false; 00060 00061 //ConsoleCommand("feigndeath"); 00062 ClientMessage("Feigning Death"); 00063 GotoState('Gimped'); 00064 } 00065 00066 //============================================================================= 00067 // functions. 00068 00069 exec function RestartLevel() 00070 { 00071 if (bInteractiveMode) { 00072 Super.RestartLevel(); 00073 } 00074 } 00075 00076 // This pawn was possessed by a player. 00077 function Possess() 00078 { 00079 if (bInteractiveMode) { 00080 Super.Possess(); 00081 } 00082 } 00083 00084 function PostBeginPlay() 00085 { 00086 local class<HUD> NewHUDType; 00087 00088 if (Level.LevelEnterText != "" ) 00089 ClientMessage(Level.LevelEnterText); 00090 bIsPlayer = true; 00091 FlashScale = vect(1,1,1); 00092 if ( Level.NetMode != NM_Client ) 00093 ScoringType = Level.Game.ScoreboardType; 00094 BlackColour.X = 0; 00095 BlackColour.Y = 0; 00096 BlackColour.Z = 0; 00097 00098 NewHUDType = class<HUD>(DynamicLoadObject("UMSHud.Letterbox", class'Class')); 00099 00100 HUDType = NewHUDType; 00101 myHUD = spawn(HUDType, self); 00102 } 00103 } 00104 00105 00106 state Gimped 00107 { 00108 exec function Fire( optional float F ) 00109 { 00110 ClientMessage("Whee, I'm Gimped!"); 00111 GotoState('WalkingState'); 00112 } 00113 00114 function ProcessMove(float DeltaTime, vector NewAccel, eDodgeDir DodgeMove, rotator DeltaRot) 00115 { 00116 //if ( bJustFired || bPressedJump || (NewAccel.Z > 0) ) 00117 // GotoState('WalkingState'); 00118 //Acceleration = vect(0,0,0); 00119 } 00120 00121 event PlayerTick( float DeltaTime ) 00122 { 00123 Weapon = None; // in case client confused because of weapon switch just before feign death 00124 if ( bUpdatePosition ) 00125 ClientUpdatePosition(); 00126 00127 PlayerMove(DeltaTime); 00128 } 00129 00130 function ServerMove 00131 ( 00132 float TimeStamp, 00133 vector Accel, 00134 vector ClientLoc, 00135 bool NewbRun, 00136 bool NewbDuck, 00137 bool NewbJumpStatus, 00138 bool bFired, 00139 bool bAltFired, 00140 bool bForceFire, 00141 bool bForceAltFire, 00142 eDodgeDir DodgeMove, 00143 byte ClientRoll, 00144 int View, 00145 optional byte OldTimeDelta, 00146 optional int OldAccel 00147 ) 00148 { 00149 Global.ServerMove(TimeStamp, Accel, ClientLoc, NewbRun, NewbDuck, NewbJumpStatus, 00150 bFired, bAltFired, bForceFire, bForceAltFire, DodgeMove, ClientRoll, (32767 & (Rotation.Pitch/2)) * 32768 + (32767 & (Rotation.Yaw/2))); 00151 } 00152 00153 function PlayerMove( float DeltaTime) 00154 { 00155 local rotator currentRot; 00156 local vector NewAccel; 00157 00158 // Update acceleration. 00159 if ( !IsAnimating() && (aForward != 0) || (aStrafe != 0) ) 00160 NewAccel = vect(0,0,1); 00161 else 00162 NewAccel = vect(0,0,0); 00163 00164 if ( Role < ROLE_Authority ) // then save this move and replicate it 00165 ReplicateMove(DeltaTime, NewAccel, DODGE_None, Rot(0,0,0)); 00166 else 00167 ProcessMove(DeltaTime, NewAccel, DODGE_None, Rot(0,0,0)); 00168 } 00169 00170 00171 function EndState() 00172 { 00173 //PlayerReplicationInfo.bFeigningDeath = false; 00174 } 00175 00176 function BeginState() 00177 { 00178 //PlayerReplicationInfo.bFeigningDeath = true; 00179 } 00180 } 00181 00182 defaultproperties 00183 { 00184 AnimSequence=None 00185 }