## XIDCine
Class Telepherique

source: C:\XIII\XIDCine\Classes\Telepherique.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Mover
             |
             +--XIII.XIIIMover
                |
                +--XIDCine.Telepherique

Direct Known Subclasses:None

class Telepherique
extends XIII.XIIIMover

    //-----------------------------------------------------------
    // Telepherique (cable-car)
    // Created by iKi
    //-----------------------------------------------------------

Variables
`Cine2` | `Carrington` Default speed
`XIIIPlayerController` | `PC` Default speed
`Array` | `Parts` Default speed
`TelepheriquePoint` | `PremierPoint` first point
`VitesseVoulue,` | `RatioPhysAlpha` Default speed
`float` | `VitesseParDefaut` Default speed

States
End, TheFall, Breaking, DangerouslySwinging, EndMove, Moving, STA_Init

State End Function Summary

State TheFall Function Summary

State Breaking Function Summary

State DangerouslySwinging Function Summary

State EndMove Function Summary

State Moving Function Summary

State STA_Init Function Summary

Source Code

    00001	//-----------------------------------------------------------
    00002	// Telepherique (cable-car)
    00003	// Created by iKi
    00004	//-----------------------------------------------------------
    00005	class Telepherique extends XIIIMover;
    00006
    00007	VAR()			TelepheriquePoint	PremierPoint;		// first point
    00008	VAR	TRANSIENT	TelepheriquePoint	PointCourant;		// current point
    00009	VAR(Crash)		TelepheriquePoint	CrashPoint;
    00010	VAR()			float				VitesseParDefaut;	// Default speed
    00011	VAR(Crash)		float				MaxInCabTime, MaxOnCabTopTime, OnCabTopCrashWarningTime, OnCabTopTimeBonus, DownTime;
    00012	VAR				float				OscillationAmplitude, OscillationRate, Temps, TempsFinal;
    00013	VAR TRANSIENT	float				Rouli, RouliDelta, VitesseCourante, VitesseVoulue, RatioPhysAlpha;
    00014	VAR(Crash)		StaticMesh			BrokenMesh;
    00015	VAR(Crash)		Actor				XIIIEjectionPoint;
    00016	VAR(Crash)		XIIIMover			GroundTrapDoor, TopTrapDoor, Ground, RopeTrapDoor, CableHook;
    00017	VAR(Crash)		Sound				FakeDropOutSound, RealDropOutSound, LandingSound, FakeDropOutMusic, RealDropOutMusic;
    00018	VAR(Crash)		name				CrashEvent, FakeDropOutEvent, SoldiersDeadTag, RealDropOutEvent, RocketTag;
    00019	VAR(Crash)		Mover				RocketActor;
    00020	VAR				BazookRocketTrail	RocketTrail;
    00021	VAR	TRANSIENT	Vector				StartFallingLocation, PlayerLocation, PosInitial;
    00022	VAR	TRANSIENT	Rotator				StartFallingRotation, RotInitial;
    00023	VAR TRANSIENT	Cine2				Carrington;
    00024	VAR				bool				bSoldiersDead, bFakeDropOutSoundPlayed, bForcedView;
    00025	VAR				CineRope			Corde;
    00026	CONST	HalfZGravity=1000;
    00027	CONST	rotationspeed=90;
    00028
    00029	VAR TRANSIENT	Array<actor>		Parts;
    00030	VAR TRANSIENT	XIIIPlayerController PC;
    00031
    00032	EVENT bool EncroachingOn( actor Other )
    00033	{
    00034		if ( Level.Title == "Hual04c" )
    00035			return false;
    00036		return Super.EncroachingOn( Other );
    00037	}
    00038	/*
    00039	EVENT BeginState()
    00040	{
    00041		Log( "BEGINSTATE"@GetStateName() );
    00042	}
    00043	*/
    00044	AUTO STATE STA_Init
    00045	{
    00046		EVENT BeginState()
    00047		{
    00048			Global.BeginState();
    00049			SetTimer( 0.1, false );
    00050		}
    00051
    00052		EVENT Timer()
    00053		{
    00054			LOCAL int i;
    00055			LOCAL Actor act;
    00056
    00057			if ( Level.Title == "Hual04c" && XIIIGameInfo(Level.Game).CheckPointNumber>1 )
    00058			{
    00059	//			LOG("STA_Init::BeginState IN");
    00060				ForEach DynamicActors(class'Actor',act,'TelepheriquePart')
    00061				{
    00062					if ( act!=CableHook )
    00063						act.Destroy();
    00064				}
    00065				SetLocation( CrashPoint.Location );
    00066				SetRotation( CrashPoint.Rotation );
    00067				StaticMEsh=BrokenMesh;
    00068				Disable('Tick');
    00069				Disable('Trigger');
    00070				SetCollision(true,true,true);
    00071				bBlockZeroExtentTraces=true;
    00072				bBlockNonZeroExtentTraces=true;
    00073				return;
    00074			}
    00075			XIIIEjectionPoint.bHidden=false;
    00076			XIIIEjectionPoint.RefreshDisplaying();
    00077			XIIIEjectionPoint.SetBase( self );
    00078			PointCourant=PremierPoint;
    00079			PosInitial=Location;
    00080			RotInitial=Rotation;
    00081			RouliDelta=15;
    00082			MoverGlideType=MV_MoveByTime;
    00083			SetPhysics(PHYS_MovingBrush);
    00084			KeyNum= 1;
    00085
    00086			ForEach DynamicActors(class'Actor',act,'TelepheriquePart')
    00087			{
    00088				act.SetPhysics(PHYS_None);
    00089				act.SetBase(self);
    00090				Parts.Insert(0,1);
    00091				Parts[0]=act;
    00092				if ( act.IsA('BreakableMover') )
    00093				{
    00094					if ( act.bBlockZeroExtentTraces )
    00095						act.bBlockPlayers=false;
    00096				}
    00097				else
    00098				{
    00099					act.Tag='Telepherique';
    00100					act.RotationRate=rot(65535,65535,65535);
    00101				}
    00102
    00103			}
    00104			TopTrapDoor.bBlockPlayers = false;
    00105			RopeTrapDoor.bBlockPlayers = false;
    00106		}
    00107
    00108		EVENT Trigger( actor Other, pawn EventInstigator )
    00109		{
    00110	//		LOCAL cine2 c;
    00111	//		LOG("STA_Init::Trigger IN");
    00112			if ( Level.Title == "Hual04c" )
    00113			{
    00114				PC=XIIIGameInfo(Level.Game).MapInfo.XIIIController;
    00115				foreach RadiusActors(class'cine2',Carrington,512)
    00116				{
    00117	//				LOG( "TELEPHERIQUE : CARRINGTON IS"@Carrington );
    00118					break;
    00119				}
    00120				if ( Carrington!=none )
    00121				{
    00122					Carrington.SetPhysics( PHYS_None );
    00123					Carrington.SetCollision( true, false, false );
    00124				}
    00125			}
    00126			SetTimer2( 0.25, false ); // Postpone start
    00127		}
    00128
    00129		EVENT Timer2( )
    00130		{
    00131			GotoState('Moving');
    00132		}
    00133	}
    00134	/*
    00135	EVENT Tick(float dt)
    00136	{
    00137		Super.Tick(dt);
    00138
    00139	//	Log( Rotation );
    00140	}
    00141	*/
    00142	STATE Moving
    00143	{
    00144		IGNORES Bump;
    00145
    00146		EVENT BeginState()
    00147		{
    00148			Global.BeginState();
    00149	        KeyFrameReached();
    00150			if ( RocketActor!=none )
    00151			{
    00152				Tag=RocketTag;
    00153			}
    00154		}
    00155
    00156		EVENT Trigger( actor Other, pawn EventInstigator )
    00157		{
    00158			if (RocketTrail==none)
    00159			{
    00160				RocketTrail = Spawn(class'BazookRocketTrail',RocketActor,,RocketActor.Location,RocketActor.Rotation);
    00161				RocketTrail.Init();
    00162			}
    00163			SetTimer( 0.5, false );
    00164		}
    00165
    00166		EVENT Timer( )
    00167		{
    00168			if ( !bForcedView && !PC.bCheatFlying ) // TODO: Disable cheat
    00169			{
    00170				bForcedView=true;
    00171				PC.GotoState( 'NoControl' );
    00172				PC.Pawn.bCanClimbLadders=false;
    00173				PC.Pawn.bHaveOnlyOneHandFree=true;
    00174			}
    00175		}
    00176
    00177		EVENT Tick(float dt)
    00178		{
    00179			LOCAL rotator r;
    00180			Global.Tick(dt);
    00181
    00182			if ( PC!=none && !PC.bCheatFlying ) // TODO: Disable cheat
    00183				PC.Pawn.SetBase( self );
    00184
    00185			if (VitesseCourante<VitesseVoulue)
    00186			{
    00187				VitesseCourante = FMin( VitesseVoulue, VitesseCourante + 1000 * dt );
    00188				PhysRate = VitesseCourante * RatioPhysAlpha;
    00189			}
    00190
    00191			r=Rotation;
    00192			if (r.Pitch<-120 || r.Pitch>120)
    00193				RouliDelta=-RouliDelta;
    00194			r.Pitch += RouliDelta * VitesseCourante / 1600;
    00195	//		LOG( "SR Moving Tick"@r);
    00196			SetRotation(r);
    00197
    00198			KeyRot[1].Pitch= r.Pitch;
    00199			OldRot.Pitch = r.Pitch;
    00200
    00201			if ( bForcedView && !PC.bCheatFlying ) // TODO: Disable cheat
    00202			{
    00203				CONST rotspeed=270;
    00204				r=rotator(RocketActor.Location-(PC.Pawn.Location+PC.Pawn.EyePosition()))-PC.Rotation;
    00205				r.Yaw= ((r.Yaw+32768)&65535)-32768;
    00206				r.Roll= ((r.Roll+32768)&65535)-32768;
    00207				r.Pitch= ((r.Pitch+32768)&65535)-32768;
    00208
    00209				PC.SetRotation(r*0.02+PC.Rotation);
    00210			}
    00211		}
    00212
    00213		EVENT KeyFrameReached()
    00214		{
    00215			if ( PointCourant == None )
    00216			{
    00217				GotoState('EndMove');
    00218				return;
    00219			}
    00220			KeyPos[1]= PointCourant.location-PosInitial;
    00221			KeyRot[1]= PointCourant.rotation-RotInitial;
    00222			KeyRot[1].Yaw = ((KeyRot[1].Yaw+32768)&65535)-32768;
    00223			KeyRot[1].Pitch = ((KeyRot[1].Pitch+32768)&65535)-32768;
    00224
    00225			OldPos    = Location;
    00226			OldRot    = Rotation;
    00227			PhysAlpha = 0.0;
    00228
    00229			bInterpolating   = true;
    00230
00231 if (PointCourant.bVitesseSpecifique==true) 00232 VitesseVoulue = PointCourant.Vitesse; 00233 else 00234 VitesseVoulue = VitesseParDefaut; 00235 00236 RatioPhysAlpha = 1.0 / VSize(PointCourant.location-OldPos); 00237 PhysRate = VitesseCourante * RatioPhysAlpha; 00238 00239 PointCourant=PointCourant.PointSuivant; 00240 } 00241 } 00242 00243 00244 STATE EndMove 00245 { 00246 Ignores Bump; 00247 00248 EVENT BeginState() 00249 { 00250 Global.BeginState(); 00251 00252 if ( Level.Title~="hual04c" ) 00253 { 00254 GotoState('DangerouslySwinging'); 00255 } 00256 else 00257 { 00258 TriggerEvent( event, self, none ); 00259 GotoState(''); 00260 } 00261 } 00262 } 00263 00264 // In cab 00265 STATE DangerouslySwinging 00266 { 00267 EVENT BeginState() 00268 { 00269 LOCAL int i; 00270 LOCAL rotator r; 00271 00272 Global.BeginState(); 00273 00274 PC.Pawn.SetPhysics( PHYS_None ); 00275 00276 CableHook.SetBase( none ); 00277 00278 r=Rotation; 00279 r.Roll=0; 00280 // LOG( "SR DangerouslySwinging BeginState"@r); 00281 SetRotation(r); 00282 00283 OscillationAmplitude=1000; //1500; 00284 OscillationRate=-450*10; //-450*8; 00285 if ( !PC.bCheatFlying ) // TODO: Disable cheat 00286 PC.bGodMode = true; 00287 Temps=0; 00288 00289 if ( RopeTrapDoor!=none ) 00290 { 00291 RopeTrapDoor.Destroy(); 00292 } 00293 00294 if (GroundTrapDoor!=none) 00295 { 00296 GroundTrapDoor.Destroy(); 00297 } 00298 00299 if ( !PC.bCheatFlying ) // TODO: Disable cheat 00300 { 00301 PlayerLocation = PC.Pawn.Location; 00302 PC.SetViewTarget(PC.Pawn); 00303 if ( PC.bWeaponMode ) 00304 { 00305 PC.OldWeap = PC.pawn.weapon.InventoryGroup; 00306 PC.Pawn.Weapon.PutDown(); 00307 } 00308 else 00309 { 00310 PC.OldItem = XIIIItems(PC.Pawn.SelectedItem); 00311 PC.OldItem.PutDown(); 00312 } 00313 PC.bWeaponBlock = true; 00314 } 00315 00316 if (TopTrapDoor!=none) 00317 { 00318 TopTrapDoor.Destroy(); 00319 } 00320 00321 tag=SoldiersDeadTag; 00322 Corde = Spawn(class'cineRope',,,Location+vect(0,57,-287)); 00323 if ( Carrington!=none ) 00324 { 00325 Carrington.SetPhysics( PHYS_WAlking ); 00326 Carrington.SetCollision( true, true, true ); 00327 } 00328 } 00329 00330 EVENT Trigger( actor Other, pawn EventInstigator ) 00331 { 00332 bSoldiersDead=true; 00333 } 00334 00335 EVENT Timer( ) 00336 { 00337 GotoState('TheFall'); 00338 } 00339 00340 EVENT Timer2( ) 00341 { 00342 if ( !PC.bCheatFlying ) // TODO: Disable cheat 00343 PC.ShakeView( 1.0*25.6, 0.3*1600.000000, vect(0,0,30), 0.3*120000, vect(0,0,0), 0) ; 00344 00345 if (FakeDropOutSound!=none) 00346 PlaySound(FakeDropOutSound); 00347 00348 if (FakeDropOutMusic!=none) 00349 PlayMusic(FakeDropOutMusic); 00350 } 00351 00352 EVENT Tick(float dt) 00353 { 00354 LOCAL rotator r; 00355 LOCAL vector v; 00356 LOCAL int i; 00357 00358 Global.Tick(dt); 00359 Temps+=dt; 00360 if ( Temps<6+5 ) 00361 { 00362 if ( !PC.bCheatFlying ) // TODO: Disable cheat 00363 { 00364 r=rot(-604,-2192,7000); //XIIIEjectionPoint.Rotation; 00365 r.Pitch+=(FRand()-0.5)*512; 00366 r.Yaw+=(FRand()-0.5)*512; 00367 r-=PC.Rotation; 00368 r.Pitch = float( ( ( r.Pitch + 32768 ) & 65535 ) - 32768 ); 00369 r.Yaw = float( ( ( r.Yaw + 32768 ) & 65535 ) - 32768 ); 00370 r.Roll = float( ( ( r.Roll + 32768 ) & 65535 ) - 32768 ); 00371 00372 /*::iKi::=>*/ 00373 v = XIIIEjectionPoint.Location-PC.Pawn.Location; 00374 v = fMin( vSize(v), 420*dt ) * Normal( v ); 00375 PC.Pawn.SetLocation( PC.Pawn.Location + v ); 00376 /*<=::iKi::*/ 00377 // PC.Pawn.SetLocation(XIIIEjectionPoint.Location*0.07+0.93*PC.Pawn.Location); 00378 PC.SetRotation(r*0.07+PC.Rotation); 00379 } 00380 00381 if ( Temps>5.5+5 ) 00382 { 00383 if ( !Corde.IsInState('STA_Tight') ) 00384 { 00385 Corde.GotoState('STA_Tight');// = true; 00386 if ( !PC.bCheatFlying ) // TODO: Disable cheat 00387 Level.SetInjuredEffect( false, 1.0); 00388 } 00389 } 00390 else 00391 { 00392 if ( !PC.bCheatFlying ) // TODO: Disable cheat 00393 Level.SetInjuredEffect( true, 1.0); 00394 } 00395 } 00396 else 00397 { 00398 if ( Temps>9+5) 00399 { 00400 if ( PC.GetStateName()=='NoControl' || PC.bCheatFlying) // TODO: Disable cheat 00401 { 00402 // if (Ground!=none) 00403 // Ground.Destroy(); 00404 Corde.GotoState('STA_Break'); 00405 if ( !PC.bCheatFlying ) // TODO: Disable cheat 00406 { 00407 PC.GotoState('PlayerWalking'); 00408 PC.Pawn.bCanClimbLadders=true; 00409 PC.Pawn.bHaveOnlyOneHandFree=false; 00410 PC.bGodMode = false; 00411 PC.bWeaponBlock = false; 00412 PC.Pawn.PendingWeapon=XIIIWeapon(PC.Pawn.FindInventoryType(class'FusilSnipe')); 00413 PC.Pawn.ChangedWeapon(); 00414 } 00415 SetTimer2( MaxInCabTime-5, false ); 00416 SetTimer( MaxInCabTime, false ); 00417 } 00418 else 00419 { 00420 if ( PC.Pawn.Location.Z-Location.Z> -172.0) 00421 { 00422 GotoState('Breaking'); 00423 return; 00424 } 00425 } 00426 } 00427 else 00428 { 00429 if ( !PC.bCheatFlying ) // TODO: Disable cheat 00430 { 00431 r.Yaw = clamp(((-28000-PC.Rotation.Yaw + 32768 ) & 65535 ) - 32768, -90*182*dt, 90*182*dt) ; 00432 r.Pitch = clamp(((-4096/**sin((Temps-6-5)*3.14/3)*/-PC.Rotation.Pitch+32768)&65535)-32768 , -30*182*dt, 30*182*dt) ; 00433 r.Roll = clamp(float( ( ( -PC.Rotation.Roll + 32768 ) & 65535 ) - 32768 ), -180*182*dt, 180*182*dt) ; 00434 PC.SetRotation(r+PC.Rotation); 00435 00436 // v=(PlayerLocation.Z-PC.Pawn.Location.z)*vect(0,0,1); 00437 v=fMin( PlayerLocation.Z-PC.Pawn.Location.z, 260*dt )*vect(0,0,1); //(PlayerLocation.Z-PC.Pawn.Location.z)*vect(0,0,1); 00438 // v.Z= Lerp(0.02, v.Z, PlayerLocation.Z); 00439 PC.Pawn.SetLocation( PC.Pawn.Location + v ); 00440 // PC.Pawn.Velocity = * Normal( v ); 00441 } 00442 } 00443 00444 } 00445 00446 r=Rotation; 00447 if ( OscillationAmplitude!=0 ) 00448 { 00449 if ( ( OscillationRate<0 && r.Pitch<-OscillationAmplitude ) 00450 || ( OscillationRate>0 && r.Pitch>OscillationAmplitude) )// 384 00451 { 00452 OscillationRate=-OscillationRate*0.65; 00453 OscillationAmplitude*=0.65; 00454 if (OscillationAmplitude<200) 00455 OscillationAmplitude=0; 00456 } 00457 r.Pitch+=OscillationRate*dt; //*VitesseCourante/800; //400 00458 // LOG( "SR DangerouslySwinging Tick"@r@"I am in State"@GetStateName()); 00459 SetRotation(r); 00460 } 00461 } 00462 } 00463 00464 STATE Breaking 00465 { 00466 EVENT BeginState() 00467 { 00468 Global.BeginState(); 00469 bInterpolating = false; 00470 // LOG ("REDRESSE LA CABINE !!!"); 00471 // LOG ("Ancienne rotation"@Rotation ); 00472 SetRotation( rot(0,0,0) ); 00473 // LOG ("Nouvelle rotation"@Rotation ); 00474 OscillationRate=2048*30; 00475 OscillationAmplitude=1750; 00476 Temps=0; 00477 if (!bSoldiersDead) 00478 { 00479 MaxOnCabTopTime+=OnCabTopTimeBonus; 00480 OnCabTopCrashWarningTime+=0.5*OnCabTopTimeBonus; 00481 } 00482 tag=''; 00483 } 00484 00485 EVENT Tick(float dt) 00486 { 00487 LOCAL rotator r; 00488 LOCAL int i; 00489 00490 Global.Tick(dt); 00491 Temps+=dt; 00492 if ( Temps>OnCabTopCrashWarningTime-0.2) 00493 { 00494 if ( !bFakeDropOutSoundPlayed ) 00495 { 00496 if (FakeDropOutSound!=none) 00497 PlaySound(FakeDropOutSound); 00498 if (FakeDropOutMusic!=none) 00499 PlayMusic(FakeDropOutMusic); 00500 TriggerEvent( FakeDropOutEvent, self, none ); 00501 PC.ShakeView( 1.0*25.6, 0.3*1600.000000, vect(0,0,30), 0.3*120000, vect(0,0,0), 0) ; 00502 bFakeDropOutSoundPlayed=true; 00503 } 00504 if (Temps>MaxOnCabTopTime) 00505 { 00506 GotoState('TheFall'); 00507 } 00508 } 00509 if ( PC.bHooked && PC.HookUsed.MyHook!=none && PC.HookUsed.MyHook.IsInState('Locked')/*&& (PC.Pawn.Base == none)*/ ) 00510 { 00511 GotoState('TheFall'); 00512 } 00513 } 00514 00515 } 00516 00517 STATE TheFall 00518 { 00519 EVENT BeginState() 00520 { 00521 // LOCAL Actor act; 00522 LOCAL int i; 00523 00524 // LOG ("THE FALL"); 00525 Corde.Destroy(); 00526 00527 if (RealDropOutSound!=none) 00528 PlaySound(RealDropOutSound); 00529 if (RealDropOutMusic!=none) 00530 PlayMusic(RealDropOutMusic); 00531 TriggerEvent(RealDropOutEvent,self,none); 00532 Global.BeginState(); 00533 StartFallingLocation = Location; 00534 StartFallingRotation = Rotation; 00535 Temps=0; 00536 TempsFinal= sqrt( (StartFallingLocation.Z-CrashPoint.Location.Z)/HalfZGravity ); // 472 00537 00538 SetCollision(false,false,false); 00539 bBlockZeroExtentTraces=false; 00540 bBlockNonZeroExtentTraces=false; 00541 bCollideWorld=false; 00542 if ( !PC.bHooked ) 00543 { 00544 // PC.SetBase( none ); 00545 PC.Pawn.DropToGround(); 00546 // Destroy(); 00547 } 00548 else 00549 { 00550 PC.GotoState('NoControl'); 00551 } 00552 00553 for ( i=0; i<Parts.Length;i++) 00554 { 00555 if ( Parts[i]!=CableHook ) 00556 Parts[i].Destroy(); 00557 } 00558 } 00559 EVENT Trigger( actor Other, pawn EventInstigator ) 00560 { 00561 } 00562 00563 EVENT Tick(float dt) 00564 { 00565 LOCAL Vector pos; 00566 LOCAL Rotator rot; 00567 00568 Global.Tick(dt); 00569 00570 Temps+=dt; 00571 if (Temps>TempsFinal) 00572 Temps=TempsFinal; 00573 pos.Z=StartFallingLocation.Z-HalfZGravity*Temps*Temps; 00574 pos.X=Lerp(Temps/TempsFinal,StartFallingLocation.X,CrashPoint.Location.X); 00575 pos.Y=Lerp(Temps/TempsFinal,StartFallingLocation.Y,CrashPoint.Location.Y); 00576 rot.Yaw=Lerp(Temps/TempsFinal,StartFallingRotation.Yaw,CrashPoint.Rotation.Yaw); 00577 rot.Roll=Lerp(Temps/TempsFinal,StartFallingRotation.Roll,CrashPoint.Rotation.Roll); 00578 rot.Pitch=Lerp(Temps/TempsFinal,StartFallingRotation.Pitch,CrashPoint.Rotation.Pitch); 00579 SetLocation(pos); 00580 SetRotation(rot); 00581 if (Temps==TempsFinal) 00582 { 00583 StaticMEsh=BrokenMesh; 00584 Disable('Tick'); 00585 SetCollision(true,true,true); 00586 bBlockZeroExtentTraces=true; 00587 bBlockNonZeroExtentTraces=true; 00588 PlaySound(LandingSound); 00589 TriggerEvent(CrashEvent,self,none); 00590 if ( PC.IsInState( 'NoControl' ) ) 00591 PC.GotoState( 'PlayerWalking' ); 00592 PC.ShakeView( 1.0*25.6, 0.9*1600.000000, vect(0,0,30), 0.9*120000, vect(0,0,0), 0) ; 00593 } 00594 00595 if ( PC.IsInState( 'NoControl' ) ) 00596 { 00597 rot=rotator(Location-(PC.Pawn.Location+PC.Pawn.EyePosition()))-PC.Rotation; 00598 rot.Yaw=Clamp( ((rot.Yaw+32768)&65535)-32768, -rotationspeed*dt*182,rotationspeed*dt*182 ); 00599 rot.Roll=Clamp( ((rot.Roll+32768)&65535)-32768, -rotationspeed*dt*182,rotationspeed*dt*182 ); 00600 rot.Pitch=Clamp( ((rot.Pitch+32768)&65535)-32768, -rotationspeed*dt*182,rotationspeed*dt*182 ); 00601 PC.SetRotation(PC.Rotation+rot); 00602 PC.Pawn.SetRotation(PC.Rotation+rot); 00603 } 00604 } 00605 } 00606 /* 00607 STATE End 00608 { 00609 Ignores Bump, Tick; 00610 00611 EVENT BeginState() 00612 { 00613 LOCAL int i; 00614 LOCAL rotator r; 00615 00616 Global.BeginState(); 00617 for (i=0;i<Parts.Length;i++) 00618 { 00619 Parts[i].SetLocation(Location+(RelativeLocations[i]>>Rotation)); 00620 Parts[i].SetRotation(Rotation+RelativeRotations[i]); 00621 } 00622 00623 r=Rotation; 00624 r.Roll=0; 00625 SetRotation(r); 00626 } 00627 }*/ 00628 00629 00630 00631 defaultproperties 00632 { 00633 VitesseParDefaut=500.000000 00634 MaxInCabTime=40.000000 00635 MaxOnCabTopTime=25.000000 00636 OnCabTopCrashWarningTime=2.000000 00637 OnCabTopTimeBonus=15.000000 00638 DownTime=8.000000 00639 BrokenMesh=StaticMesh'Telephstatic.TLcabine_cassee' 00640 CrashEvent="CabCrash" 00641 SoldiersDeadTag="We_are_dead" 00642 bNoInteractionIcon=True 00643 MoverGlideType=MV_MoveByTime 00644 bInteractive=False 00645 InitialState="STA_init" 00646 }

End Source Code