Advertisement
Guest User

X-Com Enforcer_EnforcerPlayer.uc

a guest
Jun 4th, 2021
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 80.90 KB | None | 0 0
  1. //================================================================================
  2. // EnforcerPlayer.
  3. //================================================================================
  4.  
  5. class EnforcerPlayer extends PlayerPawn
  6. Native
  7. NoNativeReplication
  8. Config(User);
  9.  
  10. var(Sounds) Sound Deaths[6];
  11. var string DefaultSkinName;
  12. var string DefaultPackage;
  13. var float LastKillTime;
  14. var(Sounds) Sound Footstep1;
  15. var(Sounds) Sound Footstep2;
  16. var(Sounds) Sound Footstep3;
  17. var(Sounds) Sound HitSound3;
  18. var(Sounds) Sound HitSound4;
  19. var(Sounds) Sound Die2;
  20. var(Sounds) Sound Die3;
  21. var(Sounds) Sound Die4;
  22. var(Sounds) Sound UWHit1;
  23. var(Sounds) Sound UWHit2;
  24. var(Sounds) Sound LandGrunt;
  25. var bool bLastJumpAlt;
  26. var bool bNeedActivate;
  27. var bool b3DSound;
  28. var int WeaponUpdate;
  29. var Texture StatusDoll;
  30. var Texture StatusBelt;
  31. var NavigationPoint StartSpot;
  32. var Weapon ClientPending;
  33. var Weapon OldClientWeapon;
  34. var Actor LastSpawned;
  35. var int Invulnerable;
  36. var int InvulnerableFlags;
  37. var float damageScale;
  38. var travel int MaxHealth;
  39. var travel float AmmoScale;
  40. var travel float JumpJetScale;
  41. var travel float SpeedScale;
  42. var travel float RegenRate;
  43. var travel int ItemUpgradeStatus[30];
  44. var() string ItemClasses[24];
  45. var() int MaxWeapon;
  46. var() int MaxPowerUp;
  47. var float CurrCamDist;
  48. var float CurrCamPitch;
  49. var() Class<Crosshair> CrossHairClass;
  50. var Crosshair MyCrossHair;
  51. var travel int SaveSlot;
  52. var int NumberOfMaps;
  53. var travel int CurrentMap;
  54. var() string BonusMapNames[16];
  55. var() int NumBonusMaps;
  56. var bool DoneResearch;
  57. var bool GotoResearch;
  58. var int ServerTeleWaitTime;
  59. var int ServerResearchWaitTime;
  60. var int ClientResearchWaitTime;
  61. var travel int DataPoints;
  62. var float LastSpawnTime;
  63. var Arrow GuideArrow;
  64. var Actor ArrowTarget;
  65. var travel int DifficultyLevel;
  66. var float ZoneCameraDist;
  67. var float ZoneCameraPitch;
  68. var bool ExtraLife;
  69. var int ExtraLifeFlags;
  70. var int ActivePowerUps[12];
  71. var float PowerUpVisibility;
  72. var bool bStart;
  73. var travel int MaxBeatGameLevel;
  74. var bool bShowTally;
  75. var travel int CollectedBonusLetters[5];
  76. var float GreedMultiplier;
  77. var float StreakMultiplier;
  78. var float CutSceneFFScale;
  79. var bool bCutSceneFF;
  80. var int CollectedPoints;
  81. var int TotalBonus;
  82. var int KillBonus;
  83. var int ComboBonus;
  84. var int ComboKillBonus;
  85. var int MaxComboBonus;
  86. var int StreakBonus;
  87. var int MaxStreakBonus;
  88. var float KillMult;
  89. var float ComboMult;
  90. var float ComboKillMult;
  91. var float MaxComboMult;
  92. var float StreakMult;
  93. var float MaxStreakMult;
  94. var travel int KillStreak;
  95. var travel int FireStatus;
  96. var travel int TotalComboKills;
  97. var travel int TotalKills;
  98. var travel int MaxCombo;
  99. var travel int NumCombos;
  100. var travel int MaxStreak;
  101. var bool bInCutScene;
  102. var travel string NextMapName;
  103. var bool NextMapIsBonus;
  104. var bool bOnFire;
  105. var int FireTime;
  106.  
  107. replication
  108. {
  109. reliable if ( Role == 4 )
  110. ClientDMGameEnded,ForceShowArrow,ShowArrow,Invulnerable,damageScale,GuideArrow,ExtraLife,ActivePowerUps,bInCutScene,NextMapIsBonus;
  111. unreliable if ( Role == 4 )
  112. ClientShowScores,ClientPlayTakeHit,ClientPlaySpeech;
  113. reliable if ( Role < 4 )
  114. SummonEx,IAmTheOne,WakeUpScriptedPawns,ICanDoIt,ServerSetDataPoints,ServerSetIUS,ServerUpgradeMe,DonHoward,SetSkin,DoneResearch;
  115. reliable if ( Role == 4 )
  116. realWeapon,SendClientFire,PlayWinMessage,ItemUpgradeStatus,GotoResearch,ClientResearchWaitTime,CollectedBonusLetters;
  117. un?reliable if ( (Role == 4) && bNetOwner )
  118. DataPoints;
  119. }
  120.  
  121. event bool PreTeleport (Teleporter InTeleporter)
  122. {
  123. local EnforcerPlayerReplicationInfo EPRI;
  124.  
  125. EPRI = EnforcerPlayerReplicationInfo(PlayerReplicationInfo);
  126. KillStreak = EPRI.KillStreak;
  127. FireStatus = EPRI.FireStatus;
  128. TotalComboKills = EPRI.TotalComboKills;
  129. TotalKills = EPRI.TotalKills;
  130. MaxCombo = EPRI.MaxCombo;
  131. NumCombos = EPRI.NumCombos;
  132. MaxStreak = EPRI.MaxStreak;
  133. return Super.PreTeleport(InTeleporter);
  134. }
  135.  
  136. simulated event PostRender (Canvas Canvas)
  137. {
  138. local EnforcerHUD EHud;
  139. local XComConsoleBase XCCB;
  140.  
  141. Super.PostRender(Canvas);
  142. if ( !bStart )
  143. {
  144. if ( EnforcerGameInfo(Level.Game) == None )
  145. {
  146. if ( Level.NetMode == 3 )
  147. {
  148. bStart = True;
  149. }
  150. return;
  151. }
  152. bStart = EnforcerGameInfo(Level.Game).DoLevelStartEvent();
  153. }
  154. }
  155.  
  156. simulated function TravelPostAccept ()
  157. {
  158. local EnforcerPlayerReplicationInfo EPRI;
  159. local XComConsoleBase XCCB;
  160.  
  161. Super.TravelPostAccept();
  162. XCCB = XComConsoleBase(Player.Console);
  163. if ( Level.NetMode == 0 )
  164. {
  165. if ( (XCCB != None) && (XCCB.Root != None) )
  166. {
  167. if ( XCCB.Root.bWindowVisible && !XCCB.bQuickKeyEnable )
  168. {
  169. SetPause(True);
  170. }
  171. }
  172. }
  173. SetupEnhancements();
  174. EPRI = EnforcerPlayerReplicationInfo(PlayerReplicationInfo);
  175. EPRI.FireStatus = FireStatus;
  176. EPRI.TotalKills = TotalKills;
  177. EPRI.NumCombos = NumCombos;
  178. EPRI.TotalComboKills = TotalComboKills;
  179. EPRI.MaxCombo = MaxCombo;
  180. EPRI.KillStreak = KillStreak;
  181. EPRI.MaxStreak = MaxStreak;
  182. GroundSpeed = Default.GroundSpeed + SpeedScale * Default.GroundSpeed;
  183. JumpZ = Default.JumpZ * JumpJetScale;
  184. if ( ItemUpgradeStatus[29] > 1 )
  185. {
  186. Health = Default.Health * 2;
  187. } else {
  188. Health = Default.Health;
  189. }
  190. }
  191.  
  192. function float GetMinSpawnTime ()
  193. {
  194. local int NumWeaps;
  195. local int i;
  196. local float Freq;
  197.  
  198. i = 0;
  199. if ( i < 30 )
  200. {
  201. if ( ItemUpgradeStatus[i] > 0 )
  202. {
  203. NumWeaps++;
  204. }
  205. i++;
  206. goto JL0007;
  207. }
  208. Freq = Clamp(12 - NumWeaps,4,10);
  209. if ( ItemUpgradeStatus[29] > 3 )
  210. {
  211. Freq *= 0.5;
  212. }
  213. return Freq;
  214. }
  215.  
  216. simulated function NotifyWeapon ()
  217. {
  218. if ( EnforcerWeapon(Weapon) != None )
  219. {
  220. EnforcerWeapon(Weapon).WeaponNotify();
  221. }
  222. }
  223.  
  224. exec function JamesWheeler ()
  225. {
  226. local Light A;
  227.  
  228. foreach AllActors(Class'Light',A)
  229. {
  230. A.LightType = 3;
  231. }
  232. }
  233.  
  234. exec function SetSkin (string SkinName)
  235. {
  236. SetMultiSkin(self,SkinName,"None",255);
  237. }
  238.  
  239. static function SetMultiSkin (Actor SkinActor, string SkinName, string FaceName, byte TeamNum)
  240. {
  241. SkinActor.MultiSkins[1] = Texture(DynamicLoadObject(SkinName $ string(1),Class'Texture'));
  242. SkinActor.MultiSkins[2] = Texture(DynamicLoadObject(SkinName $ string(2),Class'Texture'));
  243. }
  244.  
  245. exec function DonHoward ()
  246. {
  247. SetSkin("");
  248. Mesh = LodMesh'DonsCar';
  249. DrawScale = 2.0;
  250. }
  251.  
  252. exec function CutSceneFF ()
  253. {
  254. local CutSceneActor ca;
  255.  
  256. if ( !bInCutScene )
  257. {
  258. return;
  259. }
  260. ca = CutSceneActor(ViewTarget);
  261. CutSceneFFScale = 50.0;
  262. bCutSceneFF = True;
  263. SloMo(CutSceneFFScale);
  264. }
  265.  
  266. simulated function BeginCutScene (Actor CameraAct)
  267. {
  268. ViewTarget = CameraAct;
  269. if ( !bInCutScene )
  270. {
  271. if ( MyCrossHair != None )
  272. {
  273. MyCrossHair.bHidden = True;
  274. }
  275. SetInvulnerable(True,True);
  276. bInCutScene = True;
  277. bEdLocked = True;
  278. bFire = 0;
  279. if ( Role == 4 )
  280. {
  281. EnforcerGameInfo(Level.Game).CutSceneCamera = CameraAct;
  282. FreezeEnemies();
  283. CameraAct.AmbientSound = AmbientSound;
  284. }
  285. }
  286. if ( bCutSceneFF )
  287. {
  288. ConsoleCommand("StopAllSounds");
  289. }
  290. }
  291.  
  292. simulated function EndCutScene ()
  293. {
  294. SetInvulnerable(False);
  295. bInCutScene = False;
  296. bEdLocked = False;
  297. ViewTarget = None;
  298. if ( bCutSceneFF )
  299. {
  300. ConsoleCommand("StopAllSounds");
  301. }
  302. bCutSceneFF = False;
  303. if ( Role == 4 )
  304. {
  305. EnforcerGameInfo(Level.Game).CutSceneCamera = None;
  306. UnFreezeEnemies();
  307. SloMo(1.0);
  308. }
  309. }
  310.  
  311. function SetInvulnerable (bool On, optional bool NoFX)
  312. {
  313. if ( On )
  314. {
  315. Invulnerable++;
  316. if ( NoFX )
  317. {
  318. return;
  319. }
  320. Enable('Bump');
  321. bUnlit = True;
  322. DoSecondPass = True;
  323. Pass2Texture = FireTexture'Electrix';
  324. Pass2Fatness = 160;
  325. Pass2Enviro = True;
  326. } else {
  327. Invulnerable--;
  328. }
  329. if ( Invulnerable <= 0 )
  330. {
  331. bUnlit = False;
  332. DoSecondPass = False;
  333. Disable('Bump');
  334. }
  335. }
  336.  
  337. function bool IncludeAsEnemy (Actor InAct)
  338. {
  339. if ( Projectile(InAct) != None )
  340. {
  341. if ( (InAct.Owner == None) || (ScriptedPawn(InAct.Owner) != None) )
  342. {
  343. return True;
  344. }
  345. }
  346. if ( ScriptedPawn(InAct) != None )
  347. {
  348. if ( ScriptedPawn(InAct).bFreezable )
  349. {
  350. return True;
  351. }
  352. }
  353. if ( EnforcerFactory(InAct) != None )
  354. {
  355. return True;
  356. }
  357. return False;
  358. }
  359.  
  360. function FreezeEnemies ()
  361. {
  362. local Actor SP;
  363.  
  364. foreach AllActors(Class'Actor',SP)
  365. {
  366. if ( IncludeAsEnemy(SP) )
  367. {
  368. SetActorFreeze(SP,True);
  369. }
  370. }
  371. }
  372.  
  373. function UnFreezeEnemies ()
  374. {
  375. local Actor SP;
  376.  
  377. foreach AllActors(Class'Actor',SP)
  378. {
  379. if ( IncludeAsEnemy(SP) )
  380. {
  381. SetActorFreeze(SP,False);
  382. }
  383. }
  384. }
  385.  
  386. function DoFreeze (Actor Other)
  387. {
  388. local byte B;
  389.  
  390. if ( Other != None )
  391. {
  392. Other.DoSecondPass = True;
  393. Other.Pass2Texture = Texture'FreezeTex';
  394. if ( Other.FreezeIncrement >= 4 )
  395. {
  396. B = 255;
  397. } else {
  398. if ( Other.FreezeIncrement < 0 )
  399. {
  400. B = 128;
  401. } else {
  402. B = 128 + Other.FreezeIncrement * 32;
  403. }
  404. }
  405. Other.Pass2Fatness = B;
  406. Other.Pass2Enviro = True;
  407. }
  408. }
  409.  
  410. function DoUnFreeze (Actor Other)
  411. {
  412. if ( (Other != None) && (Other.Pass2Texture != FireTexture'Electrix') )
  413. {
  414. Other.DoSecondPass = False;
  415. Other.Pass2Texture = None;
  416. Other.Pass2Fatness = 128;
  417. Other.Pass2Enviro = False;
  418. }
  419. }
  420.  
  421. function bool ExcludeFromFreeze (Actor InAct)
  422. {
  423. if ( EnforcerPlayer(InAct) != None )
  424. {
  425. return True;
  426. }
  427. return False;
  428. }
  429.  
  430. function bool CanICheat ()
  431. {
  432. if ( Level.NetMode == 0 )
  433. {
  434. return True;
  435. }
  436. return False;
  437. }
  438.  
  439. exec function FreezeAllButMe ()
  440. {
  441. local Actor SP;
  442.  
  443. if ( !CanICheat() )
  444. {
  445. return;
  446. }
  447. foreach AllActors(Class'Actor',SP)
  448. {
  449. if ( !ExcludeFromFreeze(SP) )
  450. {
  451. SetActorFreeze(SP,True);
  452. }
  453. }
  454. }
  455.  
  456. exec function UnFreezeAllButMe ()
  457. {
  458. local Actor SP;
  459.  
  460. if ( !CanICheat() )
  461. {
  462. return;
  463. }
  464. foreach AllActors(Class'Actor',SP)
  465. {
  466. if ( !ExcludeFromFreeze(SP) )
  467. {
  468. SetActorFreeze(SP,False);
  469. }
  470. }
  471. }
  472.  
  473. exec function UpgradeMe (int NewLevel)
  474. {
  475. if ( !CanICheat() )
  476. {
  477. return;
  478. }
  479. ServerUpgradeMe(NewLevel);
  480. }
  481.  
  482. function ServerUpgradeMe (int NewLevel)
  483. {
  484. local int i;
  485.  
  486. i = 0;
  487. if ( i < 30 )
  488. {
  489. ItemUpgradeStatus[i] = NewLevel;
  490. i++;
  491. goto JL0007;
  492. }
  493. SetupEnhancements();
  494. Health = Default.Health;
  495. }
  496.  
  497. exec function ListUpgrades ()
  498. {
  499. local int i;
  500.  
  501. ClientMessage("****************ListUpgrades:" $ string(self) $ "****************");
  502. i = 0;
  503. if ( i < 30 )
  504. {
  505. if ( i < 24 )
  506. {
  507. ClientMessage(ItemClasses[i] $ ": " $ string(ItemUpgradeStatus[i]));
  508. } else {
  509. ClientMessage(string(i) $ ": " $ string(ItemUpgradeStatus[i]));
  510. }
  511. i++;
  512. goto JL0044;
  513. }
  514. ClientMessage(string(RegenRate));
  515. }
  516.  
  517. exec function ListAllUpgrades ()
  518. {
  519. local int i;
  520. local EnforcerPlayer EP;
  521.  
  522. foreach AllActors(Class'EnforcerPlayer',EP)
  523. {
  524. ClientMessage("****************ListUpgrades:" $ EP.PlayerReplicationInfo.PlayerName $ "****************");
  525. JL0069:
  526. i = 0;
  527. if ( i < 30 )
  528. {
  529. if ( i < 24 )
  530. {
  531. ClientMessage(ItemClasses[i] $ ": " $ string(EP.ItemUpgradeStatus[i]));
  532. } else {
  533. ClientMessage(string(i) $ ": " $ string(EP.ItemUpgradeStatus[i]));
  534. }
  535. i++;
  536. goto JL0069;
  537. }
  538. }
  539. }
  540.  
  541. function ServerSetIUS (int ItemID, int NewVal)
  542. {
  543. ItemUpgradeStatus[ItemID] = NewVal;
  544. SetupEnhancements();
  545. }
  546.  
  547. function ServerSetDataPoints (int NumDP)
  548. {
  549. DataPoints = NumDP;
  550. }
  551.  
  552. function ResetTravelVars ()
  553. {
  554. TotalKills = 0;
  555. NumCombos = 0;
  556. TotalComboKills = 0;
  557. MaxCombo = 0;
  558. KillStreak = 0;
  559. MaxStreak = 0;
  560. FireStatus = 0;
  561. }
  562.  
  563. function ResetUpgrades ()
  564. {
  565. local int i;
  566.  
  567. i = 0;
  568. if ( i < 30 )
  569. {
  570. ItemUpgradeStatus[i] = Min(ItemUpgradeStatus[i],0);
  571. if ( i > 23 )
  572. {
  573. ItemUpgradeStatus[i] = 1;
  574. }
  575. i++ ;
  576. goto JL0007;
  577. }
  578. ItemUpgradeStatus[0] = 1;
  579. ItemUpgradeStatus[1] = 1;
  580. ItemUpgradeStatus[12] = 1;
  581. ItemUpgradeStatus[14] = 1;
  582. ItemUpgradeStatus[15] = 0;
  583. SetupEnhancements();
  584. }
  585.  
  586. exec function ICanDoIt ()
  587. {
  588. local LevelMonitor LM;
  589.  
  590. if ( !CanICheat() )
  591. {
  592. return;
  593. }
  594. foreach AllActors(Class'LevelMonitor',LM)
  595. {
  596. LM.CompletionStatus = 1;
  597. }
  598. }
  599.  
  600. exec function ICanDoItBonus ()
  601. {
  602. local LevelMonitor LM;
  603.  
  604. if ( !CanICheat() )
  605. {
  606. return;
  607. }
  608. FullBonus();
  609. foreach AllActors(Class'LevelMonitor',LM)
  610. {
  611. LM.CompletionStatus = 1;
  612. }
  613. }
  614.  
  615. exec function ICantDoIt ()
  616. {
  617. local LevelMonitor LM;
  618.  
  619. if ( !CanICheat() )
  620. {
  621. return;
  622. }
  623. foreach AllActors(Class'LevelMonitor',LM)
  624. {
  625. LM.CompletionStatus = 2;
  626. }
  627. }
  628.  
  629. exec function BigBawler ()
  630. {
  631. if ( !CanICheat() )
  632. {
  633. return;
  634. }
  635. DataPoints += 1000000;
  636. }
  637.  
  638. function SpawnRocketRing ()
  639. {
  640. local Rotator CircleRot;
  641. local Projectile NewMissile;
  642. local int i;
  643.  
  644. i = 0;
  645. if ( i < 16 )
  646. {
  647. CircleRot.Yaw += 65536 / 16;
  648. SummonEx("XInventory.AirStrikeProjectile",Location + vector(CircleRot) * 50,CircleRot);
  649. NewMissile = Projectile(LastSpawned);
  650. if ( NewMissile == None )
  651. {
  652. goto JL00A5;
  653. }
  654. NewMissile.speed = i + 100 + Rand(2000);
  655. i++;
  656. goto JL0007;
  657. }
  658. }
  659.  
  660. function KilledBy (Pawn EventInstigator)
  661. {
  662. Health = 0;
  663. Died(EventInstigator,'Suicided',Location);
  664. }
  665.  
  666. function Died (Pawn Killer, name DamageType, Vector HitLocation)
  667. {
  668. local LevelMonitor L;
  669.  
  670. if ( Level.NetMode == 0 )
  671. {
  672. foreach AllActors(Class'LevelMonitor',L)
  673. {
  674. L.CompletionStatus = 2;
  675. }
  676. }
  677. Super.Died(Killer,DamageType,HitLocation);
  678. }
  679.  
  680. function TakeDamage (int Damage, Pawn instigatedBy, Vector HitLocation, Vector Momentum, name DamageType)
  681. {
  682. local int i;
  683. local EnforcerPlayerReplicationInfo EPRI;
  684. local EnforcerGameInfo EGI;
  685. local Effects FX;
  686. local Fragment M;
  687. local Class<Actor> spawneffect;
  688. local LinkedEffect L;
  689.  
  690. if ( Role < 4 )
  691. {
  692. return;
  693. }
  694. EGI = EnforcerGameInfo(Level.Game);
  695. if ( DamageType != 'DAM_LevelBuilder' )
  696. {
  697. if ( (instigatedBy == self) && !(EGI != None) && EGI.AllowSelfDamage )
  698. {
  699. return;
  700. }
  701. if ( (EnforcerPlayer(instigatedBy) != None) && Level.Game.bCoopWeaponMode )
  702. {
  703. return;
  704. }
  705. if ( Invulnerable > 0 )
  706. {
  707. if ( (InvulnerableFlags > 3) && (instigatedBy != None) && (EnforcerPlayer(instigatedBy) == None) )
  708. {
  709. instigatedBy.TakeDamage(Damage,self,instigatedBy.Location,Momentum * -1,DamageType);
  710. }
  711. return;
  712. }
  713. if ( (Damage >= Health) && ExtraLife )
  714. {
  715. foreach AllActors(Class'LinkedEffect',L)
  716. {
  717. if ( self == L.LinkActor )
  718. {
  719. L.Destroy();
  720. }
  721. }
  722. SummonEx("XInventory.LazarusEffect",Location,,True);
  723. xFlashColor = vect(0.00,1.00,1.00);
  724. xFlashTime = 2.0;
  725. ExtraLife = False;
  726. Health = 75;
  727. if ( ExtraLifeFlags > 1 )
  728. {
  729. Health = 100;
  730. SummonEx("XInventory.explosioncombo",Location);
  731. }
  732. if ( ExtraLifeFlags > 2 )
  733. {
  734. Health = 150;
  735. SummonEx("XInventory.NukeExplosion",Location);
  736. }
  737. if ( ExtraLifeFlags > 3 )
  738. {
  739. Health = 200;
  740. SummonEx("XInventory.GodPowerUp",Location);
  741. LastSpawned.Touch(self);
  742. }
  743. return;
  744. }
  745. }
  746. EPRI = EnforcerPlayerReplicationInfo(PlayerReplicationInfo);
  747. EPRI.KillStreak = ;
  748. EPRI.KillStreak
  749. 0.75
  750. )
  751. if ( EPRI.KillStreak < 10 )
  752. {
  753. EPRI.KillStreak = 0;
  754. // There are 1 jump destination(s) inside the last statement!
  755. }
  756. bOnFire = False;
  757. FireTime = 0;
  758. EnforcerGameInfo(Level.Game).FireStatusCheck(EPRI);
  759. if ( FRand() < Damage * 0.05 )
  760. {
  761. spawneffect = Class<Actor>(DynamicLoadObject("XInventory.MetalShard",Class'Class'));
  762. M = Fragment(Spawn(spawneffect,,,Location));
  763. if ( M != None )
  764. {
  765. M.CalcVelocity(Momentum,Damage * 100);
  766. M.DrawScale = Min(All,,CutSceneActor,,FRand() * 0.34999999,Damage * 0.03);
  767. )
  768. M.Skin = MultiSkins[1];
  769. M.LifeSpan = 2.0;
  770. // There are 2 jump destination(s) inside the last statement!
  771. }
  772. }
  773. if ( FRand() < Damage * 0.1 )
  774. {
  775. spawneffect = Class<Actor>(DynamicLoadObject("XInventory.Sparks",Class'Class'));
  776. FX = Effects(Spawn(spawneffect,,,Location - vector(Rotation) * 25 + vect(0.00,0.00,20.00) + VRand() * 7));
  777. if ( FX != None )
  778. {
  779. FX.DrawScale = Min(2,,FRand() * 0.1 * Damage,0.1);
  780. // There are 2 jump destination(s) inside the last statement!
  781. }
  782. }
  783. )
  784. if ( (Health >= 20) && (Health - Damage <= 20) && (Health > Damage) )
  785. {
  786. EnforcerGameInfo(Level.Game).SpeakIdea(3,1,self);
  787. // There are 1 jump destination(s) inside the last statement!
  788. }
  789. goto JL0568;
  790. if ( (Damage >= 30) && (Health - Damage > 0) )
  791. {
  792. EnforcerGameInfo(Level.Game).SpeakIdea(3,9,self);
  793. // There are 1 jump destination(s) inside the last statement!
  794. }
  795. goto JL0568;
  796. if ( (Rand(40) == 0) && (Health < 80) && (Health - Damage > 0) )
  797. {
  798. EnforcerGameInfo(Level.Game).SpeakIdea(3,6,self);
  799. // There are 1 jump destination(s) inside the last statement!
  800. }
  801. }
  802.  
  803. function PlayWinMessage (bool bWinner)
  804. {
  805. local Sound Announcement;
  806.  
  807. if ( bWinner )
  808. {
  809. ClientPlaySound(Announcement,True,True);
  810. }
  811. }
  812.  
  813. function DoJump (optional float F)
  814. {
  815. if ( carriedDecoration != None )
  816. {
  817. return;
  818. }
  819. if ( !bIsCrouching && (Physics == 1) )
  820. {
  821. if ( !bUpdating )
  822. {
  823. PlayOwnedSound(JumpSound,5,1.5,True,1200.0,1.0);
  824. }
  825. if ( (Level.Game != None) && (Level.Game.Difficulty > 0) && (PowerUpVisibility == 1.0) )
  826. {
  827. MakeNoise(0.1 * Level.Game.Difficulty);
  828. }
  829. PlayInAir();
  830. if ( bCountJumps && (Role == 4) && (Inventory != None) )
  831. {
  832. Inventory.OwnerJumped();
  833. }
  834. if ( bIsWalking )
  835. {
  836. Velocity.Z = Default.JumpZ;
  837. } else {
  838. Velocity.Z = JumpZ;
  839. }
  840. if ( (Base != Level) && (Base != None) )
  841. {
  842. Velocity.Z += Base.Velocity.Z;
  843. }
  844. SetPhysics(2);
  845. }
  846. MultiSkins[3] = FireTexture'On';
  847. }
  848.  
  849. simulated function ClientPlaySound (Sound ASound, optional bool bInterrupt, optional bool bVolumeControl)
  850. {
  851. local Actor SoundPlayer;
  852. local int Volume;
  853.  
  854. if ( b3DSound )
  855. {
  856. Volume = 1;
  857. } else {
  858. Volume = 4;
  859. }
  860. LastPlaySound = Level.TimeSeconds;
  861. if ( ViewTarget != None )
  862. {
  863. SoundPlayer = ViewTarget;
  864. } else {
  865. SoundPlayer = self;
  866. }
  867. if ( Volume == 0 )
  868. {
  869. return;
  870. }
  871. SoundPlayer.PlaySound(ASound,3,16.0,bInterrupt);
  872. if ( Volume == 1 )
  873. {
  874. return;
  875. }
  876. SoundPlayer.PlaySound(ASound,6,16.0,bInterrupt);
  877. if ( Volume == 2 )
  878. {
  879. return;
  880. }
  881. SoundPlayer.PlaySound(ASound,1,16.0,bInterrupt);
  882. if ( Volume == 3 )
  883. {
  884. return;
  885. }
  886. SoundPlayer.PlaySound(ASound,5,16.0,bInterrupt);
  887. }
  888.  
  889. simulated function ClientPlaySpeech (string SoundName, optional bool bNoOverride, optional bool bVolumeControl)
  890. {
  891. local Actor PlayActor;
  892. local Sound ASound;
  893.  
  894. PlayActor = self;
  895. ASound = Sound(DynamicLoadObject(SoundName,Class'Sound'));
  896. if ( ASound == None )
  897. {
  898. Log("######################### Speech line not found!!!! ->" @ SoundName);
  899. return;
  900. }
  901. if ( ViewTarget != None )
  902. {
  903. PlayActor = ViewTarget;
  904. }
  905. if ( bNoVoices )
  906. {
  907. return;
  908. }
  909. PlayActor.PlaySound(ASound,6,32767.0,bNoOverride);
  910. PlayActor.PlaySound(ASound,3,32767.0,bNoOverride);
  911. PlayActor.PlaySound(ASound,1,32767.0,bNoOverride);
  912. PlayActor.PlaySound(ASound,5,32767.0,bNoOverride);
  913. }
  914.  
  915. function float GetDamageScale ()
  916. {
  917. return damageScale;
  918. }
  919.  
  920. function float GetAmmoScale ()
  921. {
  922. return AmmoScale;
  923. }
  924.  
  925. function Vector SuggestItemSpawnLoc (bool TryInFront);
  926.  
  927. exec function SpawnWeaponRing ()
  928. {
  929. local int i;
  930. local Rotator Rot;
  931. local Vector Offset;
  932.  
  933. if ( !CanICheat() )
  934. {
  935. return;
  936. }
  937. Offset = vect(400.00,0.00,0.00);
  938. i = 0;
  939. if ( i < 12 )
  940. {
  941. SummonEx(ItemClasses[i],Location + (Offset >> Rot));
  942. Rot.Yaw += 65536 / 12;
  943. i++;
  944. goto JL0027;
  945. }
  946. }
  947.  
  948. exec function SpawnPowerUpRing ()
  949. {
  950. local int i;
  951. local Rotator Rot;
  952. local Vector Offset;
  953.  
  954. if ( !CanICheat() )
  955. {
  956. return;
  957. }
  958. Offset = vect(400.00,0.00,0.00);
  959. i = 0;
  960. if ( i < 12 )
  961. {
  962. SummonEx(ItemClasses[12 + i],Location + (Offset >> Rot));
  963. Rot.Yaw += 65536 / 12;
  964. i++;
  965. goto JL0027;
  966. }
  967. }
  968.  
  969. function Actor SpawnGoodie (optional Vector SpawnLoc, optional int Quality, optional bool SpawnPowerUp, optional coerce string ItemName)
  970. {
  971. local int SpawnIndex;
  972. local int ItemOffset;
  973. local int i;
  974. local int j;
  975. local int temp;
  976. local int RandA;
  977. local int RandB;
  978. local int ORDER[3];
  979. local int RandOrder[12];
  980.  
  981. if ( SpawnPowerUp == False )
  982. {
  983. ItemOffset = 0;
  984. } else {
  985. ItemOffset = MaxWeapon + 1;
  986. }
  987. if ( SpawnLoc == vect(0.00,0.00,0.00) )
  988. {
  989. SpawnLoc = SuggestItemSpawnLoc(True);
  990. }
  991. if ( GetZone(SpawnLoc).bNoSpawnItems && (ItemName == "") )
  992. {
  993. return None;
  994. }
  995. if ( (ItemName != "") && (ItemName != "None") )
  996. {
  997. SummonEx(ItemName,SpawnLoc);
  998. if ( EnforcerWeapon(LastSpawned) != None )
  999. {
  1000. LastSpawned.SetCollision(False,False,False);
  1001. }
  1002. return LastSpawned;
  1003. }
  1004. if ( Quality == 4 )
  1005. {
  1006. i = 0;
  1007. if ( i < 12 )
  1008. {
  1009. RandOrder[i] = i;
  1010. i++;
  1011. goto JL00D6;
  1012. }
  1013. i = 0;
  1014. if ( i < 30 )
  1015. {
  1016. RandA = Rand(12);
  1017. RandB = Rand(12);
  1018. temp = RandOrder[RandA];
  1019. RandOrder[RandA] = RandOrder[RandB];
  1020. RandOrder[RandB] = temp;
  1021. i++;
  1022. goto JL0104;
  1023. }
  1024. j = 0;
  1025. if ( j < 12 )
  1026. {
  1027. SpawnIndex = ItemOffset + RandOrder[j];
  1028. if ( (ItemUpgradeStatus[SpawnIndex] > 0) && (ItemClasses[SpawnIndex] != "") )
  1029. {
  1030. SummonEx(ItemClasses[SpawnIndex],SpawnLoc);
  1031. LastSpawned.LifeSpan = 12.0;
  1032. if ( EnforcerWeapon(LastSpawned) != None )
  1033. {
  1034. LastSpawned.SetCollision(False,False,False);
  1035. }
  1036. return LastSpawned;
  1037. }
  1038. j++;
  1039. goto JL016E;
  1040. }
  1041. } else {
  1042. i = 0;
  1043. if ( i < 3 )
  1044. {
  1045. ORDER[i] = i;
  1046. i++;
  1047. goto JL021A;
  1048. }
  1049. i = 0;
  1050. if ( i < 10 )
  1051. {
  1052. RandA = Rand(3);
  1053. RandB = Rand(3);
  1054. temp = ORDER[RandA];
  1055. ORDER[RandA] = ORDER[RandB];
  1056. ORDER[RandB] = temp;
  1057. i++;
  1058. goto JL0248;
  1059. }
  1060. i = Quality;
  1061. if ( i >= 0 )
  1062. {
  1063. j = 0;
  1064. if ( j < 3 )
  1065. {
  1066. SpawnIndex = ItemOffset + ORDER[j] + i * 3;
  1067. if ( (ItemUpgradeStatus[SpawnIndex] > 0) && (ItemClasses[SpawnIndex] != "") )
  1068. {
  1069. SummonEx(ItemClasses[SpawnIndex],SpawnLoc);
  1070. if ( EnforcerWeapon(LastSpawned) != None )
  1071. {
  1072. LastSpawned.SetCollision(False,False,False);
  1073. }
  1074. LastSpawned.LifeSpan = 12.0;
  1075. return LastSpawned;
  1076. }
  1077. j++;
  1078. goto JL02C8;
  1079. }
  1080. i--;
  1081. goto JL02B6;
  1082. }
  1083. }
  1084. return None;
  1085. }
  1086.  
  1087. function Rotator AdjustAim (float projSpeed, Vector projStart, int aimerror, bool bLeadTarget, bool bWarnTarget)
  1088. {
  1089. local Vector FireDir;
  1090. local Vector AimSpot;
  1091. local Vector HitNormal;
  1092. local Vector HitLocation;
  1093. local Actor BestTarget;
  1094. local float bestAim;
  1095. local float bestDist;
  1096. local Actor HitActor;
  1097.  
  1098. FireDir = vector(ViewRotation);
  1099. HitActor = Trace(HitLocation,HitNormal,projStart + 4000 * FireDir,projStart,True);
  1100. if ( (HitActor != None) && HitActor.bProjTarget )
  1101. {
  1102. if ( bWarnTarget && HitActor.IsA('Pawn') )
  1103. {
  1104. Pawn(HitActor).WarnTarget(self,projSpeed,FireDir);
  1105. }
  1106. return ViewRotation;
  1107. }
  1108. bestAim = 0.931;
  1109. BestTarget = PickTarget(bestAim,bestDist,FireDir,projStart);
  1110. if ( bAlwaysMouseLook || (bLook != 0) || (bExtra0 != 0) || (BestTarget == None) )
  1111. {
  1112. return ViewRotation;
  1113. }
  1114. AimSpot = projStart + FireDir * bestDist;
  1115. AimSpot.Z = BestTarget.Location.Z + 0.1 * BestTarget.CollisionHeight;
  1116. if ( Pawn(BestTarget) != None )
  1117. {
  1118. if ( bWarnTarget )
  1119. {
  1120. Pawn(BestTarget).WarnTarget(self,projSpeed,FireDir);
  1121. }
  1122. AimSpot.Z += 0.2 * BestTarget.CollisionHeight;
  1123. }
  1124. return rotator(AimSpot - projStart);
  1125. }
  1126.  
  1127. event bool EncroachingOn (Actor Other)
  1128. {
  1129. if ( GameReplicationInfo.bTeamGame && Other.bIsPawn && (Pawn(Other).PlayerReplicationInfo != None) && (Pawn(Other).PlayerReplicationInfo.Team == PlayerReplicationInfo.Team) )
  1130. {
  1131. return True;
  1132. }
  1133. return Super.EncroachingOn(Other);
  1134. }
  1135.  
  1136. event PlayerInput (float DeltaTime)
  1137. {
  1138. local float SmoothTime;
  1139. local float FOVScale;
  1140. local float MouseScale;
  1141. local float AbsSmoothX;
  1142. local float AbsSmoothY;
  1143. local float MouseTime;
  1144.  
  1145. if ( bShowMenu && (myHUD != None) )
  1146. {
  1147. if ( myHUD.MainMenu != None )
  1148. {
  1149. myHUD.MainMenu.MenuTick(DeltaTime);
  1150. }
  1151. bEdgeForward = False;
  1152. bEdgeBack = False;
  1153. bEdgeLeft = False;
  1154. bEdgeRight = False;
  1155. bWasForward = False;
  1156. bWasBack = False;
  1157. bWasLeft = False;
  1158. bWasRight = False;
  1159. aStrafe = 0.0;
  1160. aTurn = 0.0;
  1161. aForward = 0.0;
  1162. aLookUp = 0.0;
  1163. return;
  1164. } else {
  1165. if ( bDelayedCommand )
  1166. {
  1167. bDelayedCommand = False;
  1168. ConsoleCommand(DelayedCommand);
  1169. }
  1170. }
  1171. bEdgeForward = bWasForward ^^ (aBaseY > 0);
  1172. bEdgeBack = bWasBack ^^ (aBaseY < 0);
  1173. bEdgeLeft = bWasLeft ^^ (aStrafe > 0);
  1174. bEdgeRight = bWasRight ^^ (aStrafe < 0);
  1175. bWasForward = aBaseY > 0;
  1176. bWasBack = aBaseY < 0;
  1177. bWasLeft = aStrafe > 0;
  1178. bWasRight = aStrafe < 0;
  1179. SmoothTime = FMin(0.2,3.0 * DeltaTime * Level.TimeDilation);
  1180. FOVScale = DesiredFOV * 0.01111;
  1181. MouseScale = MouseSensitivity * FOVScale;
  1182. aMouseX *= MouseScale;
  1183. aMouseY *= MouseScale;
  1184. AbsSmoothX = SmoothMouseX;
  1185. AbsSmoothY = SmoothMouseY;
  1186. MouseTime = (Level.TimeSeconds - MouseZeroTime) / Level.TimeDilation;
  1187. if ( bMaxMouseSmoothing && (aMouseX == 0) && (MouseTime < MouseSmoothThreshold) )
  1188. {
  1189. SmoothMouseX = 0.5 * (MouseSmoothThreshold - MouseTime) * AbsSmoothX / MouseSmoothThreshold;
  1190. BorrowedMouseX += SmoothMouseX;
  1191. } else {
  1192. if ( (SmoothMouseX == 0) || (aMouseX == 0) || (SmoothMouseX > 0 != aMouseX > 0) )
  1193. {
  1194. SmoothMouseX = aMouseX;
  1195. BorrowedMouseX = 0.0;
  1196. } else {
  1197. SmoothMouseX = 0.5 * (SmoothMouseX + aMouseX - BorrowedMouseX);
  1198. if ( SmoothMouseX > 0 != aMouseX > 0 )
  1199. {
  1200. if ( aMouseX > 0 )
  1201. {
  1202. SmoothMouseX = 1.0;
  1203. } else {
  1204. SmoothMouseX = -1.0;
  1205. }
  1206. }
  1207. BorrowedMouseX = SmoothMouseX - aMouseX;
  1208. }
  1209. AbsSmoothX = SmoothMouseX;
  1210. }
  1211. if ( bMaxMouseSmoothing && (aMouseY == 0) && (MouseTime < MouseSmoothThreshold) )
  1212. {
  1213. SmoothMouseY = 0.5 * (MouseSmoothThreshold - MouseTime) * AbsSmoothY / MouseSmoothThreshold;
  1214. BorrowedMouseY += SmoothMouseY;
  1215. } else {
  1216. if ( (SmoothMouseY == 0) || (aMouseY == 0) || (SmoothMouseY > 0 != aMouseY > 0) )
  1217. {
  1218. SmoothMouseY = aMouseY;
  1219. BorrowedMouseY = 0.0;
  1220. } else {
  1221. SmoothMouseY = 0.5 * (SmoothMouseY + aMouseY - BorrowedMouseY);
  1222. if ( SmoothMouseY > 0 != aMouseY > 0 )
  1223. {
  1224. if ( aMouseY > 0 )
  1225. {
  1226. SmoothMouseY = 1.0;
  1227. } else {
  1228. SmoothMouseY = -1.0;
  1229. }
  1230. }
  1231. BorrowedMouseY = SmoothMouseY - aMouseY;
  1232. }
  1233. AbsSmoothY = SmoothMouseY;
  1234. }
  1235. if ( (aMouseX != 0) || (aMouseY != 0) )
  1236. {
  1237. MouseZeroTime = Level.TimeSeconds;
  1238. }
  1239. aLookUp *= FOVScale;
  1240. aTurn *= FOVScale;
  1241. if ( bStrafe != 0 )
  1242. {
  1243. aStrafe += aBaseX + SmoothMouseX;
  1244. aBaseX = 0.0;
  1245. } else {
  1246. aTurn += aBaseX * FOVScale + SmoothMouseX;
  1247. aBaseX = 0.0;
  1248. }
  1249. if ( (bStrafe == 0) && (bAlwaysMouseLook || (bLook != 0) || (bExtra0 != 0)) )
  1250. {
  1251. if ( bInvertMouse )
  1252. {
  1253. aLookUp -= SmoothMouseY;
  1254. } else {
  1255. aLookUp += SmoothMouseY;
  1256. }
  1257. } else {
  1258. }
  1259. SmoothMouseX = AbsSmoothX;
  1260. SmoothMouseY = AbsSmoothY;
  1261. if ( bSnapLevel != 0 )
  1262. {
  1263. bCenterView = True;
  1264. bKeyboardLook = False;
  1265. } else {
  1266. if ( aLookUp != 0 )
  1267. {
  1268. bCenterView = False;
  1269. bKeyboardLook = True;
  1270. } else {
  1271. if ( bSnapToLevel && !bAlwaysMouseLook )
  1272. {
  1273. bCenterView = True;
  1274. bKeyboardLook = False;
  1275. }
  1276. }
  1277. }
  1278. if ( bFreeLook != 0 )
  1279. {
  1280. bKeyboardLook = True;
  1281. aLookUp += 0.5 * aBaseY * FOVScale;
  1282. } else {
  1283. aForward += aBaseY;
  1284. }
  1285. aBaseY = 0.0;
  1286. HandleWalking();
  1287. }
  1288.  
  1289. event Bump (Actor Other)
  1290. {
  1291. if ( Other.IsA('ScriptedPawn') && (Invulnerable > 0) && (InvulnerableFlags > 2) && !ScriptedPawn(Other).bIsEnforcerBoss )
  1292. {
  1293. ScriptedPawn(Other).gibbedBy(self);
  1294. } else {
  1295. if ( Invulnerable == 0 )
  1296. {
  1297. Disable('Bump');
  1298. }
  1299. }
  1300. }
  1301.  
  1302. function WakeUpScriptedPawns ()
  1303. {
  1304. local ScriptedPawn S;
  1305.  
  1306. foreach AllActors(Class'ScriptedPawn',S)
  1307. {
  1308. S.WhatToDoNext('None','None');
  1309. }
  1310. }
  1311.  
  1312. function ClientReStart ()
  1313. {
  1314. Super.ClientReStart();
  1315. SetupEnhancements();
  1316. AmbientSound = Region.Zone.AmbientSound;
  1317. SoundVolume = Region.Zone.SoundVolume;
  1318. ZoneCameraDist = Region.Zone.CameraDistance;
  1319. ZoneCameraPitch = Region.Zone.CameraPitch;
  1320. ExtraLife = False;
  1321. }
  1322.  
  1323. simulated function PostBeginPlay ()
  1324. {
  1325. Super.PostBeginPlay();
  1326. MultiSkins[3] = FireTexture'Idle';
  1327. if ( Level.NetMode != 1 )
  1328. {
  1329. Shadow = Spawn(Class'PlayerShadow',self);
  1330. GuideArrow = Spawn(Class'Arrow',self);
  1331. if ( GuideArrow != None )
  1332. {
  1333. GuideArrow.bHidden = True;
  1334. GuideArrow.RemoteRole = 0;
  1335. }
  1336. }
  1337. LastKillTime = 0.0;
  1338. b3DSound = bool(ConsoleCommand("get ini:Engine.Engine.AudioDevice Use3dHardware"));
  1339. AmbientSound = Region.Zone.AmbientSound;
  1340. SoundVolume = Region.Zone.SoundVolume;
  1341. ZoneCameraDist = Region.Zone.CameraDistance;
  1342. ZoneCameraPitch = Region.Zone.CameraPitch;
  1343. }
  1344.  
  1345. function ClientReplicateSkins (Texture Skin1, optional Texture Skin2, optional Texture Skin3, optional Texture Skin4)
  1346. {
  1347. local Class<Actor> C;
  1348.  
  1349. Log("Getting " $ string(Skin1) $ ", " $ string(Skin2) $ ", " $ string(Skin3) $ ", " $ string(Skin4));
  1350. }
  1351.  
  1352. function SendClientFire (Weapon W, int N)
  1353. {
  1354. realWeapon(W,N);
  1355. }
  1356.  
  1357. function ClientPutDown (Weapon Current, Weapon Next)
  1358. {
  1359. if ( Role == 4 )
  1360. {
  1361. return;
  1362. }
  1363. bNeedActivate = False;
  1364. if ( (Current != None) && (Current != Next) )
  1365. {
  1366. Current.ClientPutDown(Next);
  1367. } else {
  1368. if ( Weapon != None )
  1369. {
  1370. if ( Weapon != Next )
  1371. {
  1372. Weapon.ClientPutDown(Next);
  1373. } else {
  1374. bNeedActivate = False;
  1375. ClientPending = None;
  1376. if ( Weapon.IsInState('ClientDown') || !Weapon.IsAnimating() )
  1377. {
  1378. Weapon.GotoState('None');
  1379. Weapon.TweenToStill();
  1380. }
  1381. }
  1382. }
  1383. }
  1384. }
  1385.  
  1386. function SendFire (Weapon W)
  1387. {
  1388. WeaponUpdate++;
  1389. SendClientFire(W,WeaponUpdate);
  1390. }
  1391.  
  1392. function UpdateRealWeapon (Weapon W)
  1393. {
  1394. WeaponUpdate++;
  1395. realWeapon(W,WeaponUpdate);
  1396. }
  1397.  
  1398. function realWeapon (Weapon Real, int N)
  1399. {
  1400. if ( N <= WeaponUpdate )
  1401. {
  1402. return;
  1403. }
  1404. WeaponUpdate = N;
  1405. Weapon = Real;
  1406. if ( (Weapon != None) && !Weapon.IsAnimating() )
  1407. {
  1408. if ( bNeedActivate || (Weapon == ClientPending) )
  1409. {
  1410. Weapon.GotoState('ClientActive');
  1411. } else {
  1412. Weapon.TweenToStill();
  1413. }
  1414. }
  1415. bNeedActivate = False;
  1416. ClientPending = None;
  1417. }
  1418.  
  1419. function ReplicateMove (float DeltaTime, Vector newAccel, EDodgeDir DodgeMove, Rotator DeltaRot)
  1420. {
  1421. Super.ReplicateMove(DeltaTime,newAccel,DodgeMove,DeltaRot);
  1422. if ( (Weapon != None) && !Weapon.IsAnimating() )
  1423. {
  1424. if ( (Weapon == ClientPending) || (Weapon != OldClientWeapon) )
  1425. {
  1426. if ( Weapon.IsInState('ClientActive') )
  1427. {
  1428. AnimEnd();
  1429. } else {
  1430. Weapon.GotoState('ClientActive');
  1431. }
  1432. if ( (Weapon != OldClientWeapon) && (OldClientWeapon != None) )
  1433. {
  1434. OldClientWeapon.GotoState('None');
  1435. }
  1436. ClientPending = None;
  1437. bNeedActivate = False;
  1438. } else {
  1439. Weapon.GotoState('None');
  1440. Weapon.TweenToStill();
  1441. }
  1442. }
  1443. OldClientWeapon = Weapon;
  1444. }
  1445.  
  1446. function PreSetMovement ()
  1447. {
  1448. bCanJump = True;
  1449. bCanWalk = True;
  1450. bCanSwim = True;
  1451. bCanFly = False;
  1452. bCanOpenDoors = True;
  1453. bCanDoSpecial = True;
  1454. }
  1455.  
  1456. function ClientVoiceMessage (PlayerReplicationInfo Sender, PlayerReplicationInfo Recipient, name MessageType, byte MessageID)
  1457. {
  1458. Super.ClientVoiceMessage(Sender,Recipient,MessageType,MessageID);
  1459. }
  1460.  
  1461. function SendGlobalMessage (PlayerReplicationInfo Recipient, name MessageType, byte MessageID, float Wait)
  1462. {
  1463. if ( Level.TimeSeconds - OldMessageTime < 5 )
  1464. {
  1465. return;
  1466. }
  1467. SendVoiceMessage(PlayerReplicationInfo,Recipient,MessageType,MessageID,'Global');
  1468. }
  1469.  
  1470. function SendTeamMessage (PlayerReplicationInfo Recipient, name MessageType, byte MessageID, float Wait)
  1471. {
  1472. if ( Level.TimeSeconds - OldMessageTime < 10 )
  1473. {
  1474. return;
  1475. }
  1476. SendVoiceMessage(PlayerReplicationInfo,Recipient,MessageType,MessageID,'Team');
  1477. }
  1478.  
  1479. function Killed (Pawn Killer, Pawn Other, name DamageType);
  1480.  
  1481. function StartWalk ()
  1482. {
  1483. UnderWaterTime = Default.UnderWaterTime;
  1484. SetCollision(True,True,True);
  1485. SetPhysics(1);
  1486. bCollideWorld = True;
  1487. GotoState('PlayerWalking');
  1488. }
  1489.  
  1490. exec function GetUpOnIt ()
  1491. {
  1492. local Inventory Inv;
  1493. local Weapon weap;
  1494. local int i;
  1495.  
  1496. if ( !CanICheat() )
  1497. {
  1498. return;
  1499. }
  1500. i = 0;
  1501. if ( i < 12 )
  1502. {
  1503. SummonEx(ItemClasses[12 + i],Location);
  1504. LastSpawned.Touch(self);
  1505. i++;
  1506. goto JL0014;
  1507. }
  1508. SummonEx("XInventory.Nuker",Location);
  1509. LastSpawned.Touch(self);
  1510. EnforcerWeapon(Weapon).ShotCount = 999;
  1511. }
  1512.  
  1513. function PlayDodge (EDodgeDir DodgeMove)
  1514. {
  1515. Velocity.Z = 300.0;
  1516. if ( DodgeMove == 1 )
  1517. {
  1518. TweenAnim('DodgeL',0.25);
  1519. } else {
  1520. if ( DodgeMove == 2 )
  1521. {
  1522. TweenAnim('DodgeR',0.25);
  1523. } else {
  1524. if ( DodgeMove == 4 )
  1525. {
  1526. TweenAnim('DodgeB',0.25);
  1527. } else {
  1528. PlayAnim('Flip',0.81 * FMax(0.34999999,Region.Zone.ZoneGravity.Z / Region.Zone.Default.ZoneGravity.Z),0.06);
  1529. }
  1530. }
  1531. }
  1532. }
  1533.  
  1534. function PlayDyingSound ()
  1535. {
  1536. local int rnd;
  1537.  
  1538. if ( HeadRegion.Zone.bWaterZone )
  1539. {
  1540. if ( FRand() < 0.5 )
  1541. {
  1542. PlaySound(UWHit1,2,16.0,,,FRand() * 0.2 + 0.89999998);
  1543. } else {
  1544. PlaySound(UWHit2,2,16.0,,,FRand() * 0.2 + 0.89999998);
  1545. }
  1546. return;
  1547. }
  1548. rnd = Rand(6);
  1549. PlaySound(Deaths[rnd],5,16.0);
  1550. PlaySound(Die2,2,16.0);
  1551. }
  1552.  
  1553. simulated function PlayBeepSound ()
  1554. {
  1555. }
  1556.  
  1557. function PlayChatting ()
  1558. {
  1559. if ( Mesh != None )
  1560. {
  1561. LoopAnim('Chat1',0.69999999,0.25);
  1562. }
  1563. }
  1564.  
  1565. function PlayWaiting ()
  1566. {
  1567. local name newAnim;
  1568. local float Decision;
  1569.  
  1570. if ( Mesh == None )
  1571. {
  1572. return;
  1573. }
  1574. if ( bIsTyping )
  1575. {
  1576. PlayChatting();
  1577. return;
  1578. }
  1579. if ( IsInState('PlayerSwimming') || (Physics == 3) )
  1580. {
  1581. BaseEyeHeight = 0.69999999 * Default.BaseEyeHeight;
  1582. LoopAnim('TreadLG');
  1583. } else {
  1584. BaseEyeHeight = Default.BaseEyeHeight;
  1585. ViewRotation.Pitch = ViewRotation.Pitch & 65535;
  1586. if ( (ViewRotation.Pitch > RotationRate.Pitch) && (ViewRotation.Pitch < 65536 - RotationRate.Pitch) )
  1587. {
  1588. if ( ViewRotation.Pitch < 32768 )
  1589. {
  1590. TweenAnim('AimUpLg',0.31);
  1591. } else {
  1592. TweenAnim('AimDnLg',0.31);
  1593. }
  1594. } else {
  1595. if ( (Weapon != None) && Weapon.bPointing )
  1596. {
  1597. if ( Weapon.bRapidFire && (bFire != 0) )
  1598. {
  1599. LoopAnim('StillFrRp');
  1600. } else {
  1601. TweenAnim('StillLgFr',0.31);
  1602. }
  1603. } else {
  1604. Decision = FRand();
  1605. if ( Decision < 0.1 )
  1606. {
  1607. PlayAnim('CockGunL',0.5 + 0.5 * FRand(),0.31);
  1608. } else {
  1609. if ( Decision < 0.41 )
  1610. {
  1611. PlayAnim('Look',0.5 + 0.5 * FRand(),0.31);
  1612. } else {
  1613. if ( FRand() < 0.5 )
  1614. {
  1615. newAnim = 'Breath1';
  1616. } else {
  1617. newAnim = 'Breath2';
  1618. }
  1619. if ( AnimSequence == newAnim )
  1620. {
  1621. LoopAnim(newAnim,0.41 + 0.41 * FRand());
  1622. } else {
  1623. PlayAnim(newAnim,0.41 + 0.41 * FRand(),0.25);
  1624. }
  1625. }
  1626. }
  1627. }
  1628. }
  1629. }
  1630. }
  1631.  
  1632. exec function IAmTheOne ()
  1633. {
  1634. bCheatsEnabled = True;
  1635. }
  1636.  
  1637. exec function SetAirControl (float F)
  1638. {
  1639. if ( bAdmin || (Level.NetMode == 0) )
  1640. {
  1641. AirControl = F;
  1642. }
  1643. }
  1644.  
  1645. exec function Advance ()
  1646. {
  1647. if ( !CanICheat() )
  1648. {
  1649. return;
  1650. }
  1651. if ( !bAdmin && (Level.NetMode != 0) )
  1652. {
  1653. return;
  1654. }
  1655. }
  1656.  
  1657. exec function AdvanceAll ()
  1658. {
  1659. if ( !CanICheat() )
  1660. {
  1661. return;
  1662. }
  1663. if ( !bAdmin && (Level.NetMode != 0) )
  1664. {
  1665. return;
  1666. }
  1667. }
  1668.  
  1669. exec function TryAnim (name AnimName)
  1670. {
  1671. if ( LastSpawned != None )
  1672. {
  1673. LastSpawned.GotoState('None');
  1674. LastSpawned.SetCollision(False,False,False);
  1675. LastSpawned.Disable('SeePlayer');
  1676. LastSpawned.Disable('HearNoise');
  1677. LastSpawned.Disable('Tick');
  1678. LastSpawned.LoopAnim(AnimName);
  1679. }
  1680. }
  1681.  
  1682. native final function CalcEnforcerView (out Vector CameraLocation, out Rotator CameraRotation, float dist);
  1683.  
  1684. native final function int GetItemUpgradeCost (int ItemID);
  1685.  
  1686. native final function SetupEnhancements ();
  1687.  
  1688. native final function SetActorFreeze (Actor InActor, bool Freeze);
  1689.  
  1690. native final function ZoneInfo GetZone (Vector InVector);
  1691.  
  1692. function DoCrossHairStuff ()
  1693. {
  1694. local Vector HitLocation;
  1695. local Vector HitNormal;
  1696. local Vector TraceDest;
  1697. local Vector TraceDir;
  1698. local Vector Start;
  1699. local Vector X;
  1700. local Vector Y;
  1701. local Vector Z;
  1702. local EnforcerHUD EHud;
  1703. local bool HideCrosshair;
  1704.  
  1705. EHud = EnforcerHUD(myHUD);
  1706. HideCrosshair = (EHud == None) || (EHud != None) && EHud.bHideHud;
  1707. if ( (Health > 0) && !bInCutScene && (bAlwaysMouseLook || (bLook != 0) || (bExtra0 != 0)) )
  1708. {
  1709. if ( MyCrossHair == None )
  1710. {
  1711. MyCrossHair = Spawn(CrossHairClass,self,,Location);
  1712. }
  1713. Start = Location;
  1714. TraceDir = vector(ViewRotation);
  1715. TraceDest = Location + TraceDir * 10000;
  1716. MyCrossHair.bHidden = HideCrosshair;
  1717. if ( Weapon != None )
  1718. {
  1719. GetAxes(ViewRotation,X,Y,Z);
  1720. Start = Location + Weapon.CalcDrawOffset() + Weapon.FireOffset.X * X + Weapon.FireOffset.Y * Y + Weapon.FireOffset.Z * Z;
  1721. TraceDir = vector(AdjustAim(1000.0,Start,1,False,False));
  1722. TraceDest = Location + TraceDir * 10000;
  1723. }
  1724. if ( Trace(HitLocation,HitNormal,TraceDest,Start,True) == None )
  1725. {
  1726. MyCrossHair.SetLocation(TraceDest);
  1727. MyCrossHair.DrawScale = 5.0;
  1728. } else {
  1729. MyCrossHair.SetLocation(HitLocation + TraceDir * -50);
  1730. MyCrossHair.DrawScale = Max(1,,VSize(HitLocation - Location),1000);
  1731. // There are 1 jump destination(s) inside the last statement!
  1732. }
  1733. )
  1734. }
  1735. goto JL0266;
  1736. if ( MyCrossHair != None )
  1737. {
  1738. MyCrossHair.bHidden = True;
  1739. // There are 1 jump destination(s) inside the last statement!
  1740. }
  1741. }
  1742.  
  1743. function ViewShake (float DeltaTime)
  1744. {
  1745. local Rotator TempRotation;
  1746.  
  1747. if ( ViewTarget != None )
  1748. {
  1749. TempRotation = ViewTarget.Rotation;
  1750. } else {
  1751. TempRotation = ViewRotation;
  1752. }
  1753. if ( shaketimer > 0.0 )
  1754. {
  1755. shaketimer -= DeltaTime;
  1756. if ( verttimer == 0 )
  1757. {
  1758. verttimer = 0.1;
  1759. shakevert = -1.12 * maxshake;
  1760. } else {
  1761. verttimer -= DeltaTime;
  1762. if ( verttimer < 0 )
  1763. {
  1764. verttimer = 0.2 * FRand();
  1765. shakevert = (2.0 * FRand() - 1) * maxshake;
  1766. }
  1767. }
  1768. TempRotation.Roll = TempRotation.Roll & 65535;
  1769. if ( bShakeDir )
  1770. {
  1771. TempRotation.Roll += ;
  1772. FMin(0.1,DeltaTime);
  1773. )
  1774. )
  1775. bShakeDir = (TempRotation.Roll > 32768) || (TempRotation.Roll < (0.5 + FRand()) * shakemag);
  1776. if ( (TempRotation.Roll < 32768) && (TempRotation.Roll > 1.29999995 * shakemag) )
  1777. {
  1778. TempRotation.Roll = ;
  1779. 1.29999995
  1780. shakemag
  1781. )
  1782. bShakeDir = False;
  1783. // There are 1 jump destination(s) inside the last statement!
  1784. }
  1785. goto JL01B1;
  1786. if ( FRand() < 3 * DeltaTime )
  1787. {
  1788. bShakeDir = !bShakeDir;
  1789. // There are 2 jump destination(s) inside the last statement!
  1790. }
  1791. }
  1792. goto JL02A3;
  1793. TempRotation.Roll -= ;
  1794. FMin(0.1,DeltaTime);
  1795. )
  1796. )
  1797. bShakeDir = (TempRotation.Roll > 32768) && (TempRotation.Roll < 65535 - (0.5 + FRand()) * shakemag);
  1798. if ( (TempRotation.Roll > 32768) && (TempRotation.Roll < 65535 - 1.29999995 * shakemag) )
  1799. {
  1800. TempRotation.Roll = ;
  1801. 65535
  1802. 1.29999995 * shakemag;
  1803. }
  1804. )
  1805. bShakeDir = True;
  1806. goto JL02A3;
  1807. if ( FRand() < 3 * DeltaTime )
  1808. {
  1809. bShakeDir = !bShakeDir;
  1810. // There are 2 jump destination(s) inside the last statement!
  1811. }
  1812. }
  1813. goto JL038C;
  1814. shakevert = 0.0;
  1815. TempRotation.Roll = TempRotation.Roll & 65535;
  1816. if ( TempRotation.Roll < 32768 )
  1817. {
  1818. if ( TempRotation.Roll > 0 )
  1819. {
  1820. TempRotation.Roll = Max(0,,TempRotation.Roll,Max(TempRotation.Roll,500) * 10 * FMin(0.1,DeltaTime));
  1821. // There are 2 jump destination(s) inside the last statement!
  1822. }
  1823. }
  1824. )
  1825. goto JL038C;
  1826. TempRotation.Roll += ;
  1827. FMin(0.1,DeltaTime);
  1828. )
  1829. )
  1830. if (! TempRotation.Roll > 65534 ) goto JL038C;
  1831. TempRotation.Roll = 0;
  1832. if ( ViewTarget != None )
  1833. {
  1834. }
  1835.  
  1836. event PlayerCalcView (out Actor ViewActor, out Vector CameraLocation, out Rotator CameraRotation)
  1837. {
  1838. local Pawn PTarget;
  1839.  
  1840. if ( ViewTarget != None )
  1841. {
  1842. ViewActor = ViewTarget;
  1843. CameraRotation = ViewActor.Rotation;
  1844. CameraLocation = ViewActor.Location;
  1845. CameraLocation.Z += EyeHeight - BaseEyeHeight;
  1846. return;
  1847. }
  1848. ViewActor = self;
  1849. CameraLocation = Location;
  1850. DoCrossHairStuff();
  1851. if ( bCollideWorld )
  1852. {
  1853. CalcEnforcerView(CameraLocation,CameraRotation,150.0);
  1854. } else {
  1855. CameraRotation = ViewRotation;
  1856. CameraLocation.Z += EyeHeight;
  1857. CameraLocation += WalkBob;
  1858. }
  1859. }
  1860.  
  1861. exec function XWalk ()
  1862. {
  1863. if ( !CanICheat() )
  1864. {
  1865. return;
  1866. }
  1867. bHidden = False;
  1868. Super.XWalk();
  1869. }
  1870.  
  1871. exec function XGhost ()
  1872. {
  1873. if ( !CanICheat() )
  1874. {
  1875. return;
  1876. }
  1877. bHidden = True;
  1878. Super.XGhost();
  1879. }
  1880.  
  1881. exec function NextWeapon ()
  1882. {
  1883. }
  1884.  
  1885. exec function PrevWeapon ()
  1886. {
  1887. }
  1888.  
  1889. function PlayFeignDeath ()
  1890. {
  1891. }
  1892.  
  1893. exec function FeignDeath ()
  1894. {
  1895. }
  1896.  
  1897. function ServerFeignDeath ()
  1898. {
  1899. }
  1900.  
  1901. function PlayRising ()
  1902. {
  1903. }
  1904.  
  1905. exec function Summon (string ClassName)
  1906. {
  1907. local Class<Actor> NewClass;
  1908.  
  1909. if ( !CanICheat() )
  1910. {
  1911. return;
  1912. }
  1913. if ( InStr(ClassName,".") == -1 )
  1914. {
  1915. ClassName = "Enforcer." $ ClassName;
  1916. }
  1917. Log("Fabricate " $ ClassName);
  1918. NewClass = Class<Actor>(DynamicLoadObject(ClassName,Class'Class'));
  1919. if ( NewClass != None )
  1920. {
  1921. LastSpawned = Spawn(NewClass,,,Location + 72 * vector(Rotation) + vect(0.00,0.00,1.00) * 15);
  1922. }
  1923. }
  1924.  
  1925. function SummonEx (string ClassName, Vector InLocation, optional Rotator InRotation, optional bool bSelfOwner)
  1926. {
  1927. local Class<Actor> NewClass;
  1928.  
  1929. if ( InStr(ClassName,".") == -1 )
  1930. {
  1931. ClassName = "Enforcer." $ ClassName;
  1932. }
  1933. NewClass = Class<Actor>(DynamicLoadObject(ClassName,Class'Class'));
  1934. if ( NewClass != None )
  1935. {
  1936. if ( bSelfOwner )
  1937. {
  1938. LastSpawned = Spawn(NewClass,,,InLocation,InRotation);
  1939. } else {
  1940. LastSpawned = Spawn(NewClass,self,,InLocation,InRotation);
  1941. }
  1942. }
  1943. }
  1944.  
  1945. function CheckBob (float DeltaTime, float Speed2D, Vector Y)
  1946. {
  1947. local float OldBobTime;
  1948. local int M;
  1949. local int N;
  1950.  
  1951. OldBobTime = bobtime;
  1952. if ( Speed2D < 10 )
  1953. {
  1954. bobtime += 0.2 * DeltaTime;
  1955. } else {
  1956. bobtime += DeltaTime * (0.31 + 0.69999999 * Speed2D / GroundSpeed);
  1957. }
  1958. WalkBob = Y * 0.41 * Bob * Speed2D * Sin(8.0 * bobtime);
  1959. AppliedBob = AppliedBob * (1 - FMin(1.0,16.0 * DeltaTime));
  1960. if ( Speed2D < 10 )
  1961. {
  1962. WalkBob.Z = AppliedBob;
  1963. } else {
  1964. WalkBob.Z = AppliedBob + 0.31 * Bob * Speed2D * Sin(16.0 * bobtime);
  1965. }
  1966. if ( LandBob > 0.01 )
  1967. {
  1968. AppliedBob += FMin(1.0,16.0 * DeltaTime) * LandBob;
  1969. LandBob *= 1 - 8 * DeltaTime;
  1970. }
  1971. if ( bBehindView || (Speed2D < 10) )
  1972. {
  1973. return;
  1974. }
  1975. M = ;
  1976. 0.5 * Pi;
  1977. 9.0 * OldBobTime / Pi;
  1978. )
  1979. N = ;
  1980. 0.5 * Pi;
  1981. 9.0 * bobtime / Pi;
  1982. )
  1983. if (! (M != N) && !bIsWalking ) goto JL01D0;
  1984. }
  1985.  
  1986. simulated function PlayFootStep ()
  1987. {
  1988. if ( PowerUpVisibility < 1 )
  1989. {
  1990. return;
  1991. }
  1992. if ( (Level.NetMode != 3) && ((Weapon == None) || !Weapon.bPointing) )
  1993. {
  1994. MakeNoise(0.1);
  1995. }
  1996. if ( bBehindView || (Role == 2) )
  1997. {
  1998. FootStepping();
  1999. }
  2000. }
  2001.  
  2002. simulated function FootStepping ()
  2003. {
  2004. local Sound Step;
  2005. local float Decision;
  2006.  
  2007. if ( FootRegion.Zone.bWaterZone )
  2008. {
  2009. PlaySound(WaterStep,3,1.0,True,1000.0,1.0);
  2010. return;
  2011. }
  2012. PlaySound(Footstep1,3,2.25,True,1000.0,1.0);
  2013. }
  2014.  
  2015. function PlayHit (float Damage, Vector HitLocation, name DamageType, Vector Momentum)
  2016. {
  2017. local float rnd;
  2018. local bool bServerGuessWeapon;
  2019. local Class<DamageType> DamageClass;
  2020. local Vector BloodOffset;
  2021. local Vector Mo;
  2022. local int iDam;
  2023.  
  2024. if ( (Damage <= 0) && (ReducedDamageType != 'All') )
  2025. {
  2026. return;
  2027. }
  2028. rnd = FClamp(Damage,20.0,60.0);
  2029. if ( DamageType == 'Burned' )
  2030. {
  2031. ClientFlash(-0.09375 * rnd,rnd * vect(16.41,11.72,4.69));
  2032. } else {
  2033. if ( DamageType == 'Corroded' )
  2034. {
  2035. ClientFlash(-0.01171875 * rnd,rnd * vect(9.38,14.06,4.69));
  2036. } else {
  2037. ClientFlash(-0.019 * rnd,rnd * vect(26.50,4.50,4.50));
  2038. }
  2039. }
  2040. ShakeView(0.151 + 0.05 * Damage,Damage * 30,0.31 * Damage);
  2041. }
  2042.  
  2043. function PlayDeathHit (float Damage, Vector HitLocation, name DamageType, Vector Momentum)
  2044. {
  2045. local Vector Mo;
  2046.  
  2047. if ( Region.Zone.bDestructive && (Region.Zone.ExitActor != None) )
  2048. {
  2049. Spawn(Region.Zone.ExitActor);
  2050. }
  2051. if ( ( !Level.bDropDetail || (FRand() < 0.672)) && ((DamageType == 'shot') || (DamageType == 'Decapitated') || (DamageType == 'shredded')) )
  2052. {
  2053. Mo = Momentum;
  2054. if ( Mo.Z > 0 )
  2055. {
  2056. Mo.Z *= 0.5;
  2057. }
  2058. }
  2059. }
  2060.  
  2061. function PlayTakeHitSound (int Damage, name DamageType, int Mult)
  2062. {
  2063. local float Select;
  2064.  
  2065. if ( Level.TimeSeconds - LastPainSound < 0.31 )
  2066. {
  2067. return;
  2068. }
  2069. LastPainSound = Level.TimeSeconds;
  2070. Select = FRand();
  2071. if ( Select < 0.331 )
  2072. {
  2073. PlaySound(HitSound1,2,16.0,,,FRand() * 0.151 + 0.89999998);
  2074. } else {
  2075. if ( Select < 0.663 )
  2076. {
  2077. PlaySound(HitSound2,2,16.0,,,FRand() * 0.151 + 0.89999998);
  2078. } else {
  2079. PlaySound(HitSound3,2,16.0,,,FRand() * 0.151 + 0.89999998);
  2080. }
  2081. }
  2082. }
  2083.  
  2084. exec function Krexor ()
  2085. {
  2086. ConsoleCommand("DEBUG GPF");
  2087. }
  2088.  
  2089. exec function ElBruce ()
  2090. {
  2091. ConsoleCommand("DEBUG CRASH");
  2092. }
  2093.  
  2094. exec function ShowScores ()
  2095. {
  2096. if ( EnforcerHUD(myHUD).bDoingIntro || (Level.LevelNumber <= 0) || (Level.Screenshot == None) || (Level.Author == "") )
  2097. {
  2098. return;
  2099. }
  2100. bShowScores = !bShowScores;
  2101. if ( Level.NetMode == 0 )
  2102. {
  2103. SetPause(bShowScores);
  2104. }
  2105. }
  2106.  
  2107. exec function ShowArrow ()
  2108. {
  2109. if ( bInCutScene )
  2110. {
  2111. return;
  2112. }
  2113. if ( GuideArrow.bHidden )
  2114. {
  2115. GetTarget();
  2116. if ( ArrowTarget != None )
  2117. {
  2118. GuideArrow.ShowMe();
  2119. }
  2120. }
  2121. }
  2122.  
  2123. exec function ForceShowArrow ()
  2124. {
  2125. GetTarget();
  2126. if ( ArrowTarget != None )
  2127. {
  2128. GuideArrow.ShowMe();
  2129. }
  2130. }
  2131.  
  2132. function GetTarget ()
  2133. {
  2134. local ScriptedPawn S1;
  2135. local ScriptedPawn S2;
  2136. local Generator A1;
  2137. local Generator A2;
  2138. local Human H1;
  2139. local Human H2;
  2140. local ExitTeleporter T1;
  2141. local int ShortestDistance;
  2142. local int MyZoneNumber;
  2143.  
  2144. if ( GuideArrow == None )
  2145. {
  2146. return;
  2147. }
  2148. GuideArrow.bHidden = False;
  2149. ArrowTarget = None;
  2150. S2 = None;
  2151. A2 = None;
  2152. H2 = None;
  2153. ShortestDistance = 999999;
  2154. MyZoneNumber = Region.Zone.ObjectiveNumber;
  2155. foreach AllActors(Class'ExitTeleporter',T1)
  2156. {
  2157. if ( !T1.bHidden )
  2158. {
  2159. ArrowTarget = T1;
  2160. return;
  2161. }
  2162. }
  2163. foreach AllActors(Class'Generator',A1)
  2164. {
  2165. if ( A1.GroupNumber > 0 )
  2166. {
  2167. if ( (A2 == None) || (A1.GroupNumber < A2.GroupNumber) || (A1.GroupNumber == A2.GroupNumber) && (VSize(A1.Location - Location) < ShortestDistance) )
  2168. {
  2169. ShortestDistance = ;
  2170. A1
  2171. switch ()
  2172. {
  2173. CreatureCarcass
  2174. // There are 1 jump destination(s) inside the last statement!
  2175. }
  2176. } else {
  2177. goto JL01F9;
  2178. if ( (A1.Region.Zone.ObjectiveNumber < MyZoneNumber) || (VSize(A1.Location - Location) < ShortestDistance) && (A1.Region.Zone.ObjectiveNumber == MyZoneNumber) )
  2179. {
  2180. ShortestDistance = ;
  2181. A1
  2182. switch ()
  2183. // There are 2 jump destination(s) inside the last statement!
  2184. {
  2185. }
  2186. if ( A2 == None )
  2187. {
  2188. foreach AllActors(Class'Generator',A1)
  2189. {
  2190. if ( VSize(A1.Location - Location) < ShortestDistance )
  2191. {
  2192. ShortestDistance = ;
  2193. A1
  2194. switch ()
  2195. // There are 2 jump destination(s) inside the last statement!
  2196. {
  2197. }
  2198. if ( A2 != None )
  2199. {
  2200. ArrowTarget = A2;
  2201. // There are 1 jump destination(s) inside the last statement!
  2202. }
  2203. foreach AllActors(Class'Human',H1)
  2204. {
  2205. if ( ArrowTarget == None )
  2206. {
  2207. ShortestDistance = ;
  2208. JL01F9:
  2209. H1
  2210. switch ()
  2211. // There are 1 jump destination(s) inside the last statement!
  2212. {
  2213. return bRescued;
  2214. )
  2215. (H1.Region.Zone.ObjectiveNumber < ArrowTarget.Region.Zone.ObjectiveNumber) || (VSize(H1.Location - Location) < ShortestDistance) && (H1.Region.Zone.ObjectiveNumber == ArrowTarget.Region.Zone.ObjectiveNumber);
  2216. )
  2217. ShortestDistance = ;
  2218. H1
  2219. switch ()
  2220. {
  2221. Default.LastSpawned
  2222. )
  2223. ShortestDistance = ;
  2224. H1
  2225. }
  2226.  
  2227. event HeadZoneChange (ZoneInfo newHeadZone)
  2228. {
  2229. Super.HeadZoneChange(newHeadZone);
  2230. AmbientSound = Region.Zone.AmbientSound;
  2231. SoundVolume = Region.Zone.SoundVolume;
  2232. ZoneCameraDist = Region.Zone.CameraDistance;
  2233. ZoneCameraPitch = Region.Zone.CameraPitch;
  2234. }
  2235.  
  2236. function ClientPlayTakeHit (Vector HitLoc, byte Damage, bool bServerGuessWeapon)
  2237. {
  2238. HitLoc += Location;
  2239. if ( bServerGuessWeapon && ((GetAnimGroup(AnimSequence) == 'Dodge') || (Weapon != None) && Weapon.bPointing) )
  2240. {
  2241. return;
  2242. }
  2243. Enable('AnimEnd');
  2244. bAnimTransition = True;
  2245. BaseEyeHeight = Default.BaseEyeHeight;
  2246. PlayTakeHit(0.1,HitLoc,Damage);
  2247. }
  2248.  
  2249. function Gasp ()
  2250. {
  2251. if ( Role != 4 )
  2252. {
  2253. return;
  2254. }
  2255. }
  2256.  
  2257. function bool Gibbed (name DamageType)
  2258. {
  2259. return False;
  2260. }
  2261.  
  2262. function PlayDying (name DamageType, Vector HitLoc)
  2263. {
  2264. if ( Level.LevelNumber != -1 )
  2265. {
  2266. EnforcerGameInfo(Level.Game).SpeakIdea(2,16,self);
  2267. }
  2268. if ( DamageType == 'DAM_LevelBuilder' )
  2269. {
  2270. PlayAnim('Dead2');
  2271. return;
  2272. }
  2273. switch (Rand(9))
  2274. {
  2275. case 0:
  2276. PlayAnim('Dead1');
  2277. break;
  2278. case 1:
  2279. PlayAnim('Dead2');
  2280. break;
  2281. case 2:
  2282. PlayAnim('Dead3');
  2283. break;
  2284. case 3:
  2285. PlayAnim('Dead4');
  2286. break;
  2287. case 4:
  2288. PlayAnim('Dead7');
  2289. break;
  2290. case 5:
  2291. PlayAnim('Dead8');
  2292. break;
  2293. case 6:
  2294. PlayAnim('Dead9');
  2295. break;
  2296. case 7:
  2297. PlayAnim('Dead9B');
  2298. break;
  2299. case 8:
  2300. PlayAnim('Dead11');
  2301. break;
  2302. default:
  2303. PlayAnim('Dead11');
  2304. break;
  2305. }
  2306. }
  2307.  
  2308. function PlayTurning ()
  2309. {
  2310. BaseEyeHeight = Default.BaseEyeHeight;
  2311. PlayAnim('TurnLg',0.31,0.31);
  2312. }
  2313.  
  2314. function TweenToWalking (float TweenTime)
  2315. {
  2316. BaseEyeHeight = Default.BaseEyeHeight;
  2317. if ( Weapon == None )
  2318. {
  2319. TweenAnim('Walk',TweenTime);
  2320. } else {
  2321. if ( Weapon.bPointing || (carriedDecoration != None) )
  2322. {
  2323. TweenAnim('WalkLgFr',TweenTime);
  2324. } else {
  2325. TweenAnim('WalkLg',TweenTime);
  2326. }
  2327. }
  2328. }
  2329.  
  2330. function PlayWalking ()
  2331. {
  2332. BaseEyeHeight = Default.BaseEyeHeight;
  2333. if ( Weapon == None )
  2334. {
  2335. LoopAnim('Walk');
  2336. } else {
  2337. if ( Weapon.bPointing || (carriedDecoration != None) )
  2338. {
  2339. LoopAnim('WalkLgFr');
  2340. } else {
  2341. LoopAnim('WalkLg');
  2342. }
  2343. }
  2344. }
  2345.  
  2346. function TweenToRunning (float TweenTime)
  2347. {
  2348. local Vector X;
  2349. local Vector Y;
  2350. local Vector Z;
  2351. local Vector Dir;
  2352.  
  2353. BaseEyeHeight = Default.BaseEyeHeight;
  2354. if ( bIsWalking )
  2355. {
  2356. TweenToWalking(0.1);
  2357. return;
  2358. }
  2359. GetAxes(Rotation,X,Y,Z);
  2360. Dir = Normal(Acceleration);
  2361. if ( (Dir Dot X < 0.75) && (Dir != vect(0.00,0.00,0.00)) )
  2362. {
  2363. if ( Dir Dot X < -0.75 )
  2364. {
  2365. PlayAnim('Backrun',0.89999998,TweenTime);
  2366. } else {
  2367. if ( Dir Dot Y > 0 )
  2368. {
  2369. PlayAnim('StrafeR',0.89999998,TweenTime);
  2370. } else {
  2371. PlayAnim('StrafeL',0.89999998,TweenTime);
  2372. }
  2373. }
  2374. } else {
  2375. if ( Weapon == None )
  2376. {
  2377. PlayAnim('RunLg',0.89999998,TweenTime);
  2378. } else {
  2379. if ( Weapon.bPointing )
  2380. {
  2381. PlayAnim('RunLgFr',0.89999998,TweenTime);
  2382. } else {
  2383. if ( Weapon.Mass < 20 )
  2384. {
  2385. PlayAnim('RunLg',0.89999998,TweenTime);
  2386. } else {
  2387. PlayAnim('RunLgFr',0.89999998,TweenTime);
  2388. }
  2389. }
  2390. }
  2391. }
  2392. }
  2393.  
  2394. function PlayRunning ()
  2395. {
  2396. local Vector X;
  2397. local Vector Y;
  2398. local Vector Z;
  2399. local Vector Dir;
  2400.  
  2401. BaseEyeHeight = Default.BaseEyeHeight;
  2402. GetAxes(Rotation,X,Y,Z);
  2403. Dir = Normal(Acceleration);
  2404. if ( (Dir Dot X < 0.75) && (Dir != vect(0.00,0.00,0.00)) )
  2405. {
  2406. if ( Dir Dot X < -0.75 )
  2407. {
  2408. LoopAnim('Backrun');
  2409. } else {
  2410. if ( Dir Dot Y > 0 )
  2411. {
  2412. LoopAnim('StrafeR');
  2413. } else {
  2414. LoopAnim('StrafeL');
  2415. }
  2416. }
  2417. } else {
  2418. if ( Weapon == None )
  2419. {
  2420. LoopAnim('RunLg');
  2421. } else {
  2422. if ( Weapon.bPointing )
  2423. {
  2424. LoopAnim('RunLgFr');
  2425. } else {
  2426. if ( Weapon.Mass < 20 )
  2427. {
  2428. LoopAnim('RunLg');
  2429. } else {
  2430. LoopAnim('RunLgFr');
  2431. }
  2432. }
  2433. }
  2434. }
  2435. }
  2436.  
  2437. function PlayGutHit (float TweenTime)
  2438. {
  2439. if ( (AnimSequence == 'GutHit') || (AnimSequence == 'Dead2') )
  2440. {
  2441. if ( FRand() < 0.5 )
  2442. {
  2443. TweenAnim('LeftHit',TweenTime);
  2444. } else {
  2445. TweenAnim('RightHit',TweenTime);
  2446. }
  2447. } else {
  2448. if ( FRand() < 0.62 )
  2449. {
  2450. TweenAnim('GutHit',TweenTime);
  2451. } else {
  2452. TweenAnim('Dead2',TweenTime);
  2453. }
  2454. }
  2455. }
  2456.  
  2457. function PlayHeadHit (float TweenTime)
  2458. {
  2459. if ( AnimSequence == 'Dead4' )
  2460. {
  2461. TweenAnim('GutHit',TweenTime);
  2462. } else {
  2463. TweenAnim('Dead4',TweenTime);
  2464. }
  2465. }
  2466.  
  2467. function PlayLeftHit (float TweenTime)
  2468. {
  2469. if ( (AnimSequence == 'LeftHit') || (AnimSequence == 'Dead3') )
  2470. {
  2471. TweenAnim('GutHit',TweenTime);
  2472. } else {
  2473. if ( FRand() < 0.62 )
  2474. {
  2475. TweenAnim('LeftHit',TweenTime);
  2476. } else {
  2477. TweenAnim('Dead3',TweenTime);
  2478. }
  2479. }
  2480. }
  2481.  
  2482. function PlayRightHit (float TweenTime)
  2483. {
  2484. if ( AnimSequence == 'RightHit' )
  2485. {
  2486. TweenAnim('GutHit',TweenTime);
  2487. } else {
  2488. if ( FRand() < 0.62 )
  2489. {
  2490. TweenAnim('RightHit',TweenTime);
  2491. }
  2492. }
  2493. }
  2494.  
  2495. function PlayLanded (float impactVel)
  2496. {
  2497. impactVel = impactVel / JumpZ;
  2498. impactVel = 0.1 * impactVel * impactVel;
  2499. BaseEyeHeight = Default.BaseEyeHeight;
  2500. if ( impactVel > 0.17 )
  2501. {
  2502. PlayOwnedSound(LandGrunt,5,FMin(5.0,5.0 * impactVel),False,1200.0,FRand() * 0.41 + 0.81);
  2503. }
  2504. if ( !FootRegion.Zone.bWaterZone && (impactVel > 0.01) )
  2505. {
  2506. PlayOwnedSound(Land,3,FClamp(4.0 * impactVel,0.5,5.0),False,1000.0,1.0);
  2507. }
  2508. if ( (impactVel > 0.06) || (GetAnimGroup(AnimSequence) == 'Jumping') || (GetAnimGroup(AnimSequence) == 'Ducking') )
  2509. {
  2510. TweenAnim('LandLgFr',0.1);
  2511. } else {
  2512. if ( !IsAnimating() )
  2513. {
  2514. if ( GetAnimGroup(AnimSequence) == 'TakeHit' )
  2515. {
  2516. SetPhysics(1);
  2517. AnimEnd();
  2518. } else {
  2519. TweenAnim('LandLgFr',0.1);
  2520. }
  2521. }
  2522. }
  2523. MultiSkins[3] = FireTexture'Idle';
  2524. }
  2525.  
  2526. function PlayInAir ()
  2527. {
  2528. local Vector X;
  2529. local Vector Y;
  2530. local Vector Z;
  2531. local Vector Dir;
  2532. local float F;
  2533. local float TweenTime;
  2534.  
  2535. BaseEyeHeight = 0.69999999 * Default.BaseEyeHeight;
  2536. if ( (GetAnimGroup(AnimSequence) == 'Landing') && !bLastJumpAlt )
  2537. {
  2538. GetAxes(Rotation,X,Y,Z);
  2539. Dir = Normal(Acceleration);
  2540. F = Dir Dot Y;
  2541. if ( F > 0.69999999 )
  2542. {
  2543. TweenAnim('DodgeL',0.34999999);
  2544. } else {
  2545. if ( F < -0.69999999 )
  2546. {
  2547. TweenAnim('DodgeR',0.34999999);
  2548. } else {
  2549. if ( Dir Dot X > 0 )
  2550. {
  2551. TweenAnim('DodgeF',0.34999999);
  2552. } else {
  2553. TweenAnim('DodgeB',0.34999999);
  2554. }
  2555. }
  2556. }
  2557. bLastJumpAlt = True;
  2558. return;
  2559. }
  2560. bLastJumpAlt = False;
  2561. if ( GetAnimGroup(AnimSequence) == 'Jumping' )
  2562. {
  2563. TweenAnim('DuckWlkS',2.0);
  2564. return;
  2565. } else {
  2566. if ( GetAnimGroup(AnimSequence) == 'Ducking' )
  2567. {
  2568. TweenTime = 2.0;
  2569. } else {
  2570. TweenTime = 0.69999999;
  2571. }
  2572. }
  2573. if ( AnimSequence == 'StrafeL' )
  2574. {
  2575. TweenAnim('DodgeR',TweenTime);
  2576. } else {
  2577. if ( AnimSequence == 'StrafeR' )
  2578. {
  2579. TweenAnim('DodgeL',TweenTime);
  2580. } else {
  2581. if ( AnimSequence == 'Backrun' )
  2582. {
  2583. TweenAnim('DodgeB',TweenTime);
  2584. } else {
  2585. TweenAnim('JumpLgFr',TweenTime);
  2586. }
  2587. }
  2588. }
  2589. }
  2590.  
  2591. function PlayDuck ()
  2592. {
  2593. }
  2594.  
  2595. function PlayCrawling ()
  2596. {
  2597. }
  2598.  
  2599. function TweenToWaiting (float TweenTime)
  2600. {
  2601. if ( IsInState('PlayerSwimming') || (Physics == 3) )
  2602. {
  2603. BaseEyeHeight = 0.69999999 * Default.BaseEyeHeight;
  2604. TweenAnim('TreadLG',TweenTime);
  2605. } else {
  2606. BaseEyeHeight = Default.BaseEyeHeight;
  2607. if ( (Weapon == None) || (Weapon.Mass < 20) )
  2608. {
  2609. TweenAnim('StillLgFr',TweenTime);
  2610. } else {
  2611. TweenAnim('StillFrRp',TweenTime);
  2612. }
  2613. }
  2614. }
  2615.  
  2616. function PlayRecoil (float Rate)
  2617. {
  2618. if ( Weapon.bRapidFire )
  2619. {
  2620. if ( !IsAnimating() && (Physics == 1) )
  2621. {
  2622. LoopAnim('StillFrRp',0.02);
  2623. }
  2624. } else {
  2625. if ( AnimSequence == 'StillLgFr' )
  2626. {
  2627. PlayAnim('StillLgFr',Rate,0.02);
  2628. } else {
  2629. if ( (AnimSequence == 'StillLgFr') || (AnimSequence == 'StillFrRp') )
  2630. {
  2631. PlayAnim('StillLgFr',Rate,0.02);
  2632. }
  2633. }
  2634. }
  2635. }
  2636.  
  2637. function PlayFiring ()
  2638. {
  2639. if ( AnimSequence == 'RunLg' )
  2640. {
  2641. AnimSequence = 'RunLgFr';
  2642. } else {
  2643. if ( AnimSequence == 'WalkLg' )
  2644. {
  2645. AnimSequence = 'WalkLgFr';
  2646. } else {
  2647. if ( AnimSequence == 'JumpLgFr' )
  2648. {
  2649. TweenAnim('JumpLgFr',0.03);
  2650. } else {
  2651. if ( (GetAnimGroup(AnimSequence) == 'Waiting') || (GetAnimGroup(AnimSequence) == 'Gesture') && (AnimSequence != 'TreadLG') )
  2652. {
  2653. if ( Weapon.Mass < 20 )
  2654. {
  2655. TweenAnim('StillLgFr',0.02);
  2656. } else {
  2657. TweenAnim('StillFrRp',0.02);
  2658. }
  2659. }
  2660. }
  2661. }
  2662. }
  2663. }
  2664.  
  2665. function PlayWeaponSwitch (Weapon NewWeapon)
  2666. {
  2667. if ( NewWeapon == None )
  2668. {
  2669. return;
  2670. }
  2671. if ( NewWeapon.bRapidFire )
  2672. {
  2673. if ( AnimSequence == 'StillLgFr' )
  2674. {
  2675. AnimSequence = 'StillFrRp';
  2676. }
  2677. } else {
  2678. if ( AnimSequence == 'StillFrRp' )
  2679. {
  2680. AnimSequence = 'StillLgFr';
  2681. }
  2682. }
  2683. if ( NewWeapon.Mass < 20 )
  2684. {
  2685. if ( AnimSequence == 'RunLgFr' )
  2686. {
  2687. AnimSequence = 'RunLg';
  2688. }
  2689. } else {
  2690. if ( AnimSequence == 'RunLg' )
  2691. {
  2692. AnimSequence = 'RunLgFr';
  2693. }
  2694. }
  2695. }
  2696.  
  2697. function PlaySwimming ()
  2698. {
  2699. BaseEyeHeight = 0.69999999 * Default.BaseEyeHeight;
  2700. LoopAnim('SwimLG');
  2701. }
  2702.  
  2703. function TweenToSwimming (float TweenTime)
  2704. {
  2705. BaseEyeHeight = 0.69999999 * Default.BaseEyeHeight;
  2706. TweenAnim('SwimLG',TweenTime);
  2707. }
  2708.  
  2709. function NeedActivate ()
  2710. {
  2711. bNeedActivate = True;
  2712. }
  2713.  
  2714. state TeleportOut
  2715. {
  2716. ignores Died, SwitchWeapon, KilledBy;
  2717.  
  2718. function BeginState ()
  2719. {
  2720. Log("***************** TeleportOut.BeginState: " $ string(self));
  2721. SummonEx("XInventory.Teleouteffect",Location);
  2722. bFrozen = True;
  2723. bInCutScene = False;
  2724. GroundSpeed = 0.0;
  2725. AirSpeed = 0.0;
  2726. JumpZ = 0.0;
  2727. Velocity = vect(0.00,0.00,0.00);
  2728. bFire = 0;
  2729. Style = 3;
  2730. xFlashTime = 2.0;
  2731. xFlashColor = vect(1.00,1.00,1.00);
  2732. SetTimer(0.69999999,False);
  2733. if ( Weapon != None )
  2734. {
  2735. Weapon.GotoState('FinishFire');
  2736. EnforcerWeapon(Weapon).DelAllWeapons(self);
  2737. }
  2738. if ( (Level.NetMode == 2) && (RemoteRole == 2) )
  2739. {
  2740. ServerTeleWaitTime = 0;
  2741. }
  2742. }
  2743.  
  2744. exec function Fire (optional float F)
  2745. {
  2746. }
  2747.  
  2748. exec function Jump (optional float F)
  2749. {
  2750. }
  2751.  
  2752. function Timer ()
  2753. {
  2754. local EnforcerPlayer EP;
  2755.  
  2756. if ( !bHidden )
  2757. {
  2758. bHidden = True;
  2759. bFrozen = True;
  2760. GroundSpeed = 0.0;
  2761. JumpZ = 0.0;
  2762. Velocity = vect(0.00,0.00,0.00);
  2763. SetCollision(False,False,False);
  2764. SetPhysics(0);
  2765. SetTimer(1.25,False);
  2766. } else {
  2767. if ( Level.NetMode == 0 )
  2768. {
  2769. NextMapIsBonus = FoundAllBonusLetters();
  2770. ClearAllBonusLetters();
  2771. DoGameEnded();
  2772. GotoState('GameEnded');
  2773. } else {
  2774. if ( (Level.NetMode == 2) && (RemoteRole == 2) )
  2775. {
  2776. Log("******************" $ string(self) $ " Waiting in TeleportOut:" $ string(ServerTeleWaitTime));
  2777. if ( ServerTeleWaitTime++ < 60 )
  2778. {
  2779. foreach AllActors(Class'EnforcerPlayer',EP)
  2780. {
  2781. if ( !EP.IsInState('TeleportOut') )
  2782. {
  2783. Log("****************** Player Not Ready: " $ string(EP) $ " in state " $ string(EP.GetStateName()));
  2784. SetTimer(1.0,False);
  2785. return;
  2786. }
  2787. }
  2788. }
  2789. Log("******************" $ "DONE Waiting in TeleportOut, Checking Bonus");
  2790. NextMapIsBonus = FoundAllBonusLetters();
  2791. Log("******************" $ "NextMapIsBonus:" $ string(NextMapIsBonus));
  2792. ClearAllBonusLetters();
  2793. foreach AllActors(Class'EnforcerPlayer',EP)
  2794. {
  2795. Log("***************** Sending " $ string(EP) $ " to GameEnded");
  2796. EP.NextMapIsBonus = NextMapIsBonus;
  2797. EP.DoGameEnded();
  2798. EP.GotoState('GameEnded');
  2799. EP.ClientGameEnded();
  2800. }
  2801. } else {
  2802. if ( Level.NetMode == 2 )
  2803. {
  2804. Log("******************" $ string(self) $ " Waiting in TeleportOut - NOT THE MAN");
  2805. }
  2806. }
  2807. }
  2808. }
  2809. }
  2810.  
  2811. }
  2812.  
  2813. state FeigningDeath extends FeigningDeath
  2814. {
  2815. function NeedActivate ()
  2816. {
  2817. bNeedActivate = False;
  2818. }
  2819.  
  2820. function BeginState ()
  2821. {
  2822. if ( (Role == 4) && (PlayerReplicationInfo.HasFlag != None) && PlayerReplicationInfo.HasFlag.IsA('CTFFlag') )
  2823. {
  2824. PlayerReplicationInfo.HasFlag.Drop(vect(0.00,0.00,0.00));
  2825. }
  2826. Super.BeginState();
  2827. bNeedActivate = False;
  2828. }
  2829.  
  2830. }
  2831.  
  2832. state Dying extends Dying
  2833. {
  2834. ignores SwitchWeapon, KilledBy;
  2835.  
  2836. exec function ShowScores ()
  2837. {
  2838. }
  2839.  
  2840. function ViewFlash (float DeltaTime)
  2841. {
  2842. if ( Carcass(ViewTarget) != None )
  2843. {
  2844. InstantFlash = -0.31;
  2845. InstantFog = vect(0.25,0.03,0.03);
  2846. }
  2847. Super.ViewFlash(DeltaTime);
  2848. }
  2849.  
  2850. function PlayerCalcView (out Actor ViewActor, out Vector CameraLocation, out Rotator CameraRotation)
  2851. {
  2852. CurrCamDist = 150.0;
  2853. ZoneCameraDist = 150.0;
  2854. ViewTarget = None;
  2855. if ( MyCrossHair != None )
  2856. {
  2857. MyCrossHair.bHidden = True;
  2858. }
  2859. CalcEnforcerView(CameraLocation,CameraRotation,150.0);
  2860. }
  2861.  
  2862. function FindGoodView ()
  2863. {
  2864. local Vector cameraLoc;
  2865. local Rotator cameraRot;
  2866. local int tries;
  2867. local int besttry;
  2868. local float bestDist;
  2869. local float newdist;
  2870. local int startYaw;
  2871. local Actor ViewActor;
  2872.  
  2873. ViewRotation.Pitch = 56000;
  2874. tries = 0;
  2875. besttry = 0;
  2876. bestDist = 0.0;
  2877. startYaw = ViewRotation.Yaw;
  2878. tries = 0;
  2879. if ( tries < 16 )
  2880. {
  2881. cameraLoc = Location;
  2882. PlayerCalcView(ViewActor,cameraLoc,cameraRot);
  2883. newdist = VSize(cameraLoc - Location);
  2884. if ( newdist > bestDist )
  2885. {
  2886. bestDist = newdist;
  2887. besttry = tries;
  2888. }
  2889. ViewRotation.Yaw += 4096;
  2890. tries++;
  2891. goto JL0040;
  2892. }
  2893. ViewRotation.Yaw = startYaw + besttry * 4096;
  2894. }
  2895.  
  2896. function ServerReStartPlayer ()
  2897. {
  2898. if ( Level.NetMode == 3 )
  2899. {
  2900. return;
  2901. }
  2902. if ( Level.Game.RestartPlayer(self) )
  2903. {
  2904. ServerTimeStamp = 0.0;
  2905. TimeMargin = 0.0;
  2906. Enemy = None;
  2907. Level.Game.StartPlayer(self);
  2908. if ( Mesh != None )
  2909. {
  2910. PlayWaiting();
  2911. }
  2912. ExtraLife = False;
  2913. SetupEnhancements();
  2914. ClientReStart();
  2915. } else {
  2916. Log("Restartplayer failed");
  2917. }
  2918. }
  2919.  
  2920. exec function Fire (optional float F)
  2921. {
  2922. local LevelMonitor LM;
  2923. local PowerUp P;
  2924.  
  2925. if ( EnforcerHUD(myHUD) != None )
  2926. {
  2927. EnforcerHUD(myHUD).ClearMessages();
  2928. }
  2929. if ( (Level.NetMode == 0) && !Level.Game.bDeathMatch )
  2930. {
  2931. if ( bFrozen )
  2932. {
  2933. return;
  2934. }
  2935. ServerReStartPlayer();
  2936. if ( Level.LevelNumber == -1 )
  2937. {
  2938. ShowResearchMenu();
  2939. }
  2940. } else {
  2941. if ( !bFrozen )
  2942. {
  2943. if ( Level.NetMode == 2 )
  2944. {
  2945. foreach AllActors(Class'LevelMonitor',LM)
  2946. {
  2947. if ( Abs(LM.CompletionStatus) == 2 )
  2948. {
  2949. Level.Game.RestartGame();
  2950. return;
  2951. }
  2952. }
  2953. }
  2954. foreach AllActors(Class'PowerUp',P)
  2955. {
  2956. if ( P.Activator == self )
  2957. {
  2958. P.KillPowerUp();
  2959. }
  2960. }
  2961. ServerReStartPlayer();
  2962. WakeUpScriptedPawns();
  2963. }
  2964. }
  2965. }
  2966.  
  2967. function Timer ()
  2968. {
  2969. bFrozen = False;
  2970. bPressedJump = False;
  2971. }
  2972.  
  2973. function BeginState ()
  2974. {
  2975. Acceleration = vect(0.00,0.00,0.00);
  2976. SetCollision(True,False,False);
  2977. SetPhysics(2);
  2978. ClientMessage("Press Fire to continue, ESC to Quit...",'Tally');
  2979. BaseEyeHeight = Default.BaseEyeHeight;
  2980. LastKillTime = 0.0;
  2981. EyeHeight = BaseEyeHeight;
  2982. if ( Carcass(ViewTarget) == None )
  2983. {
  2984. bBehindView = True;
  2985. }
  2986. bFrozen = True;
  2987. bPressedJump = False;
  2988. bJumpStatus = False;
  2989. bJustFired = False;
  2990. bJustAltFired = False;
  2991. if ( (Role == 4) && Level.Game.IsA('EnforcerDeathMatchGameInfo') )
  2992. {
  2993. bShowScores = True;
  2994. } else {
  2995. if ( (Level.NetMode != 0) && (EnforcerDMHUD(myHUD) != None) )
  2996. {
  2997. ClientShowScores();
  2998. }
  2999. }
  3000. FindGoodView();
  3001. SetTimer(1.0,False);
  3002. if ( SavedMoves != None )
  3003. {
  3004. SavedMoves.Destroy();
  3005. SavedMoves = SavedMoves.NextMove;
  3006. goto JL0128;
  3007. }
  3008. if ( PendingMove != None )
  3009. {
  3010. PendingMove.Destroy();
  3011. PendingMove = None;
  3012. }
  3013. }
  3014.  
  3015. function EndState ()
  3016. {
  3017. if ( SavedMoves != None )
  3018. {
  3019. SavedMoves.Destroy();
  3020. SavedMoves = SavedMoves.NextMove;
  3021. goto JL0000;
  3022. }
  3023. if ( PendingMove != None )
  3024. {
  3025. PendingMove.Destroy();
  3026. PendingMove = None;
  3027. }
  3028. Velocity = vect(0.00,0.00,0.00);
  3029. Acceleration = vect(0.00,0.00,0.00);
  3030. bShowScores = False;
  3031. bShowTally = False;
  3032. bJustFired = False;
  3033. bJustAltFired = False;
  3034. bPressedJump = False;
  3035. if ( Carcass(ViewTarget) != None )
  3036. {
  3037. ViewTarget = None;
  3038. }
  3039. }
  3040.  
  3041. }
  3042.  
  3043. function ClientShowScores ()
  3044. {
  3045. bShowScores = True;
  3046. }
  3047.  
  3048. exec function Fire (optional float F)
  3049. {
  3050. if ( !bEdLocked )
  3051. {
  3052. Super.Fire(F);
  3053. }
  3054. }
  3055.  
  3056. exec function BigHuge ()
  3057. {
  3058. DrawScale = 5.0;
  3059. }
  3060.  
  3061. exec function LabsMeDown ()
  3062. {
  3063. DrawScale = 1.25;
  3064. }
  3065.  
  3066. exec function FatBaby ()
  3067. {
  3068. Fatness = 255;
  3069. }
  3070.  
  3071. exec function CutsMeUp ()
  3072. {
  3073. Fatness = 1;
  3074. }
  3075.  
  3076. exec function Jump (optional float F)
  3077. {
  3078. if ( !bEdLocked )
  3079. {
  3080. Super.Jump(F);
  3081. }
  3082. }
  3083.  
  3084. function bool FoundAllBonusLetters ()
  3085. {
  3086. if ( (CollectedBonusLetters[0] == 1) && (CollectedBonusLetters[1] == 1) && (CollectedBonusLetters[2] == 1) && (CollectedBonusLetters[3] == 1) && (CollectedBonusLetters[4] == 1) )
  3087. {
  3088. return True;
  3089. }
  3090. return False;
  3091. }
  3092.  
  3093. function ClearAllBonusLetters ()
  3094. {
  3095. local EnforcerPlayer EP;
  3096.  
  3097. foreach AllActors(Class'EnforcerPlayer',EP)
  3098. {
  3099. EP.CollectedBonusLetters[0] = 0;
  3100. EP.CollectedBonusLetters[1] = 0;
  3101. EP.CollectedBonusLetters[2] = 0;
  3102. EP.CollectedBonusLetters[3] = 0;
  3103. EP.CollectedBonusLetters[4] = 0;
  3104. }
  3105. }
  3106.  
  3107. exec function FullBonus ()
  3108. {
  3109. local EnforcerPlayer EP;
  3110.  
  3111. if ( !CanICheat() )
  3112. {
  3113. return;
  3114. }
  3115. foreach AllActors(Class'EnforcerPlayer',EP)
  3116. {
  3117. EP.CollectedBonusLetters[0] = 1;
  3118. EP.CollectedBonusLetters[1] = 1;
  3119. EP.CollectedBonusLetters[2] = 1;
  3120. EP.CollectedBonusLetters[3] = 1;
  3121. EP.CollectedBonusLetters[4] = 1;
  3122. }
  3123. }
  3124.  
  3125. function ClientDMGameEnded ()
  3126. {
  3127. GotoState('DMGameEnded');
  3128. }
  3129.  
  3130. state DMGameEnded
  3131. {
  3132. ignores PlayerMove, Died, TakeDamage, KilledBy;
  3133.  
  3134. exec function Fire (optional float F)
  3135. {
  3136. }
  3137.  
  3138. function ServerMove (float TimeStamp, Vector InAccel, Vector ClientLoc, bool NewbRun, bool NewbDuck, bool NewbJumpStatus, bool bFired, bool bAltFired, bool bForceFire, bool bForceAltFire, EDodgeDir DodgeMove, byte ClientRoll, int View, optional byte OldTimeDelta, optional int OldAccel)
  3139. {
  3140. Global.ServerMove(TimeStamp,InAccel,ClientLoc,NewbRun,NewbDuck,NewbJumpStatus,bFired,bAltFired,bForceFire,bForceAltFire,DodgeMove,ClientRoll,(32767 & ViewRotation.Pitch / 2) * 32768 + (32767 & ViewRotation.Yaw / 2));
  3141. }
  3142.  
  3143. function FindGoodView ()
  3144. {
  3145. local Vector cameraLoc;
  3146. local Rotator cameraRot;
  3147. local int tries;
  3148. local int besttry;
  3149. local float bestDist;
  3150. local float newdist;
  3151. local int startYaw;
  3152. local Actor ViewActor;
  3153.  
  3154. ViewRotation.Pitch = 56000;
  3155. tries = 0;
  3156. besttry = 0;
  3157. bestDist = 0.0;
  3158. startYaw = ViewRotation.Yaw;
  3159. tries = 0;
  3160. if ( tries < 16 )
  3161. {
  3162. if ( ViewTarget != None )
  3163. {
  3164. cameraLoc = ViewTarget.Location;
  3165. } else {
  3166. cameraLoc = Location;
  3167. }
  3168. PlayerCalcView(ViewActor,cameraLoc,cameraRot);
  3169. newdist = VSize(cameraLoc - Location);
  3170. if ( newdist > bestDist )
  3171. {
  3172. bestDist = newdist;
  3173. besttry = tries;
  3174. }
  3175. ViewRotation.Yaw += 4096;
  3176. tries++;
  3177. goto JL0040;
  3178. }
  3179. ViewRotation.Yaw = startYaw + besttry * 4096;
  3180. }
  3181.  
  3182. function Timer ()
  3183. {
  3184. bFrozen = False;
  3185. }
  3186.  
  3187. function BeginState ()
  3188. {
  3189. local Pawn P;
  3190.  
  3191. EndZoom();
  3192. AnimRate = 0.0;
  3193. SimAnim.Y = 0.0;
  3194. bFire = 0;
  3195. bAltFire = 0;
  3196. SetCollision(True,False,False);
  3197. bShowScores = True;
  3198. bFrozen = True;
  3199. if ( !bFixedCamera )
  3200. {
  3201. FindGoodView();
  3202. bBehindView = True;
  3203. }
  3204. SetTimer(1.5,False);
  3205. SetPhysics(0);
  3206. foreach AllActors(Class'Pawn',P)
  3207. {
  3208. P.Velocity = vect(0.00,0.00,0.00);
  3209. P.SetPhysics(0);
  3210. }
  3211. }
  3212.  
  3213. }
  3214.  
  3215. exec function SimonThePieman ()
  3216. {
  3217. local int i;
  3218.  
  3219. i = 0;
  3220. if ( i < 100 )
  3221. {
  3222. SummonEx("XInventory.StickyProjectile",Location + vect(0.00,0.00,200.00) + VRand() * 100);
  3223. LastSpawned.MultiSkins[1] = Texture'JPoap_01';
  3224. LastSpawned.Style = 1;
  3225. LastSpawned.LightType = 0;
  3226. ClientPlaySound(Sound'SimonTPM');
  3227. i++;
  3228. goto JL0007;
  3229. }
  3230. }
  3231.  
  3232. exec function TheSegerSteamer ()
  3233. {
  3234. SimonThePieman();
  3235. }
  3236.  
  3237. exec function TheHManHotPlate ()
  3238. {
  3239. SimonThePieman();
  3240. }
  3241.  
  3242. state GameEnded extends GameEnded
  3243. {
  3244. ignores BeginState, Died, TakeDamage, KilledBy;
  3245.  
  3246. exec function ShowScores ()
  3247. {
  3248. }
  3249.  
  3250. exec function Fire (optional float F)
  3251. {
  3252. local LevelMonitor LM;
  3253. local EnforcerPlayer EP;
  3254. local int NextBonusNum;
  3255.  
  3256. foreach AllActors(Class'LevelMonitor',LM)
  3257. {
  3258. if ( LM.bSkipRnD )
  3259. {
  3260. return;
  3261. }
  3262. }
  3263. if ( (Level.NetMode == 0) && (ClientResearchWaitTime < 1) )
  3264. {
  3265. return;
  3266. }
  3267. if ( EnforcerScoreBoard(Scoring).TallyTime <= 3.0 )
  3268. {
  3269. EnforcerScoreBoard(Scoring).TallyTime = 3.0;
  3270. return;
  3271. }
  3272. if ( EnforcerScoreBoard(Scoring).BringUp )
  3273. {
  3274. EnforcerScoreBoard(Scoring).BringUp = False;
  3275. return;
  3276. }
  3277. if ( GotoResearch == False )
  3278. {
  3279. return;
  3280. }
  3281. ClientSetMusic(None,0,255,1);
  3282. if ( Level.LevelNumber != -1 )
  3283. {
  3284. CurrentMap++;
  3285. }
  3286. if ( NextMapIsBonus )
  3287. {
  3288. if ( (Level.NetMode != 3) && (Role == 4) )
  3289. {
  3290. if ( (Level.NetMode == 2) && (RemoteRole == 2) )
  3291. {
  3292. NextMapName = MultiPlayerGetNextMapName();
  3293. Log(" ------- NextMap: " $ NextMapName);
  3294. NextBonusNum = Rand(NumBonusMaps);
  3295. if ( NextBonusNum == 1 )
  3296. {
  3297. NextBonusNum = 2;
  3298. }
  3299. Level.ServerTravel(BonusMapNames[NextBonusNum] $ "?Game=" $ string(Level.Game.Class),True);
  3300. } else {
  3301. if ( Level.NetMode == 0 )
  3302. {
  3303. Level.ServerTravel(BonusMapNames[Rand(NumBonusMaps)],True);
  3304. }
  3305. }
  3306. }
  3307. } else {
  3308. ShowResearchMenu();
  3309. }
  3310. GotoResearch = False;
  3311. }
  3312.  
  3313. function Timer ()
  3314. {
  3315. local EnforcerPlayer EPIter;
  3316.  
  3317. if ( (Level.NetMode == 2) && (RemoteRole == 2) )
  3318. {
  3319. ClientResearchWaitTime = 2;
  3320. if ( ServerResearchWaitTime++ < 45 )
  3321. {
  3322. foreach AllActors(Class'EnforcerPlayer',EPIter)
  3323. {
  3324. if ( !EPIter.DoneResearch )
  3325. {
  3326. return;
  3327. }
  3328. }
  3329. }
  3330. MultiPlayerGotoNextMap();
  3331. } else {
  3332. if ( ++ClientResearchWaitTime >= 1 )
  3333. {
  3334. SetTimer(0.0,False);
  3335. }
  3336. }
  3337. }
  3338.  
  3339. function PrepareForTravel ()
  3340. {
  3341. local EnforcerPlayerReplicationInfo EPRI;
  3342.  
  3343. EPRI = EnforcerPlayerReplicationInfo(PlayerReplicationInfo);
  3344. KillStreak = EPRI.KillStreak;
  3345. FireStatus = EPRI.FireStatus;
  3346. TotalComboKills = EPRI.TotalComboKills;
  3347. TotalKills = EPRI.TotalKills;
  3348. MaxCombo = EPRI.MaxCombo;
  3349. NumCombos = EPRI.NumCombos;
  3350. MaxStreak = EPRI.MaxStreak;
  3351. }
  3352.  
  3353. }
  3354.  
  3355. function MultiPlayerGotoNextMap ()
  3356. {
  3357. local MapList myList;
  3358. local string NextMap;
  3359.  
  3360. Log("MultiPlayerGotoNextMap())))))" @ NextMapName);
  3361. if ( (Level.LevelNumber < 0) && (NextMapName != "") )
  3362. {
  3363. Level.ServerTravel(NextMapName $ "?Game=" $ string(Level.Game.Class),True);
  3364. NextMapName = "";
  3365. return;
  3366. }
  3367. myList = Spawn(Level.Game.MapListType);
  3368. NextMap = myList.GetNextMap();
  3369. myList.Destroy();
  3370. if ( NextMap == "" )
  3371. {
  3372. NextMap = GetMapName(Level.Game.MapPrefix,NextMap,1);
  3373. }
  3374. if ( NextMap != "" )
  3375. {
  3376. Level.ServerTravel(NextMap $ "?Game=" $ string(Level.Game.Class),True);
  3377. return;
  3378. }
  3379. Log("ERROR in MultiPlayerGotoNextMap, NextMap is None");
  3380. Level.ServerTravel("Map01" $ "?Game=" $ string(Level.Game.Class),True);
  3381. }
  3382.  
  3383. function string MultiPlayerGetNextMapName ()
  3384. {
  3385. local MapList myList;
  3386. local string NextMap;
  3387.  
  3388. myList = Spawn(Level.Game.MapListType);
  3389. NextMap = myList.GetNextMap();
  3390. myList.Destroy();
  3391. if ( NextMap == "" )
  3392. {
  3393. NextMap = GetMapName(Level.Game.MapPrefix,NextMap,1);
  3394. }
  3395. if ( NextMap != "" )
  3396. {
  3397. return NextMap;
  3398. }
  3399. Log("ERROR in MultiPlayerGetNextMapName, NextMap is None");
  3400. return "Map01";
  3401. }
  3402.  
  3403. exec function Pause ()
  3404. {
  3405. }
  3406.  
  3407. function MultiPlayerRestartMap ()
  3408. {
  3409. local string CurrMapStr;
  3410.  
  3411. CurrMapStr = GetURLMap();
  3412. Log("CURRENT MAP:" $ CurrMapStr);
  3413. Level.ServerTravel(CurrMapStr $ "?Game=" $ string(Level.Game.Class),True);
  3414. }
  3415.  
  3416. function bool SetPause (bool bPause)
  3417. {
  3418. bFire = 0;
  3419. return Level.Game.SetPause(bPause,self);
  3420. }
  3421.  
  3422. exec function ShowMenu ()
  3423. {
  3424. WalkBob = vect(0.00,0.00,0.00);
  3425. bShowMenu = True;
  3426. Player.Console.GotoState('Menuing');
  3427. if ( Level.NetMode == 0 )
  3428. {
  3429. SetPause(True);
  3430. }
  3431. }
  3432.  
  3433. exec function ShowResearchMenu ()
  3434. {
  3435. WalkBob = vect(0.00,0.00,0.00);
  3436. bShowMenu = True;
  3437. if ( (Player == None) || (XComConsoleBase(Player.Console) == None) )
  3438. {
  3439. return;
  3440. }
  3441. Player.Console.GotoState('Menuing');
  3442. XComConsoleBase(Player.Console).DoSomeResearch();
  3443. if ( Level.NetMode == 0 )
  3444. {
  3445. SetPause(True);
  3446. }
  3447. if ( (Role == 4) && (CurrentMap != 0) )
  3448. {
  3449. EnforcerGameInfo(Level.Game).SpeakIdea(3,17,self);
  3450. }
  3451. }
  3452.  
  3453. exec function MeetTheSectoids ()
  3454. {
  3455. if ( !CanICheat() )
  3456. {
  3457. return;
  3458. }
  3459. Level.ServerTravel("map40.xcm",True);
  3460. }
  3461.  
  3462. exec function ShowMainMenu ()
  3463. {
  3464. WalkBob = vect(0.00,0.00,0.00);
  3465. bShowMenu = True;
  3466. Player.Console.GotoState('Menuing');
  3467. XComConsoleBase(Player.Console).DoMainMenu();
  3468. if ( Level.NetMode == 0 )
  3469. {
  3470. SetPause(True);
  3471. }
  3472. }
  3473.  
  3474. simulated function DoGameEnded ()
  3475. {
  3476. ServerResearchWaitTime = 0;
  3477. GotoResearch = True;
  3478. }
  3479.  
  3480. state PlayerWalking extends PlayerWalking
  3481. {
  3482. function Dodge (EDodgeDir DodgeMove)
  3483. {
  3484. local Vector X;
  3485. local Vector Y;
  3486. local Vector Z;
  3487. local float RealGroundSpeed;
  3488.  
  3489. RealGroundSpeed = Default.GroundSpeed;
  3490. if ( bIsCrouching || (Physics != 1) )
  3491. {
  3492. return;
  3493. }
  3494. GetAxes(Rotation,X,Y,Z);
  3495. if ( DodgeMove == 3 )
  3496. {
  3497. Velocity = 1.5 * RealGroundSpeed * X + Velocity Dot Y * Y;
  3498. } else {
  3499. if ( DodgeMove == 4 )
  3500. {
  3501. Velocity = -1.5 * RealGroundSpeed * X + Velocity Dot Y * Y;
  3502. } else {
  3503. if ( DodgeMove == 1 )
  3504. {
  3505. Velocity = 1.5 * RealGroundSpeed * Y + Velocity Dot X * X;
  3506. } else {
  3507. if ( DodgeMove == 2 )
  3508. {
  3509. Velocity = -1.5 * RealGroundSpeed * Y + Velocity Dot X * X;
  3510. }
  3511. }
  3512. }
  3513. }
  3514. Velocity.Z = 160.0;
  3515. PlayOwnedSound(JumpSound,5,1.0,True,800.0,1.0);
  3516. PlayDodge(DodgeMove);
  3517. DodgeDir = 5;
  3518. SetPhysics(2);
  3519. }
  3520.  
  3521. function ProcessMove (float DeltaTime, Vector newAccel, EDodgeDir DodgeMove, Rotator DeltaRot)
  3522. {
  3523. if ( bEdLocked )
  3524. {
  3525. Acceleration = newAccel;
  3526. return;
  3527. }
  3528. Super.ProcessMove(DeltaTime,newAccel,DodgeMove,DeltaRot);
  3529. }
  3530.  
  3531. }
  3532.  
  3533. defaultproperties
  3534. {
  3535. Footstep1=Sound'Effects.Default_Step'
  3536.  
  3537. Footstep2=Sound'Effects.Default_Step'
  3538.  
  3539. Footstep3=Sound'Effects.Default_Step'
  3540.  
  3541. HitSound3=Sound'Effects.GetHit3'
  3542.  
  3543. HitSound4=Sound'Effects.HardLand'
  3544.  
  3545. Die2=Sound'Effects.Died'
  3546.  
  3547. LandGrunt=Sound'Effects.SoftLand'
  3548.  
  3549. damageScale=1.00
  3550.  
  3551. MaxHealth=200
  3552.  
  3553. AmmoScale=1.00
  3554.  
  3555. JumpJetScale=1.00
  3556.  
  3557. SpeedScale=1.00
  3558.  
  3559. ItemClasses(0)="XInventory.BoomerangGun"
  3560.  
  3561. ItemClasses(1)="XInventory.FlameThrower"
  3562.  
  3563. ItemClasses(2)="XInventory.ShotGun"
  3564.  
  3565. ItemClasses(3)="XInventory.FreezeGun"
  3566.  
  3567. ItemClasses(4)="XInventory.RailGun"
  3568.  
  3569. ItemClasses(5)="XInventory.FusionRifle"
  3570.  
  3571. ItemClasses(6)="XInventory.GrenadeLauncher"
  3572.  
  3573. ItemClasses(7)="XInventory.ThermalLance"
  3574.  
  3575. ItemClasses(8)="XInventory.LightningGun"
  3576.  
  3577. ItemClasses(9)="XInventory.RocketLauncher"
  3578.  
  3579. ItemClasses(10)="XInventory.PsiGun"
  3580.  
  3581. ItemClasses(11)="XInventory.Nuker"
  3582.  
  3583. ItemClasses(12)="XInventory.HealthPowerup"
  3584.  
  3585. ItemClasses(13)="XInventory.HotStreakHelper"
  3586.  
  3587. ItemClasses(14)="XInventory.SpeedPowerup"
  3588.  
  3589. ItemClasses(15)="XInventory.QuadPowerUp"
  3590.  
  3591. ItemClasses(16)="XInventory.ExtraLifePowerUp"
  3592.  
  3593. ItemClasses(17)="XInventory.GreedPowerUp"
  3594.  
  3595. ItemClasses(18)="XInventory.ZapPowerup"
  3596.  
  3597. ItemClasses(19)="XInventory.InvisiblePowerup"
  3598.  
  3599. ItemClasses(20)="XInventory.AirStrikePowerup"
  3600.  
  3601. ItemClasses(21)="XInventory.TimeShiftPowerUp"
  3602.  
  3603. ItemClasses(22)="XInventory.OptionPowerUp"
  3604.  
  3605. ItemClasses(23)="XInventory.GodPowerup"
  3606.  
  3607. MaxWeapon=11
  3608.  
  3609. MaxPowerUp=23
  3610.  
  3611. CrossHairClass=Class'Crosshair'
  3612.  
  3613. NumberOfMaps=39
  3614.  
  3615. BonusMapNames(0)="..\maps\Bonus01.xcm"
  3616.  
  3617. BonusMapNames(1)="..\maps\Bonus02.xcm"
  3618.  
  3619. BonusMapNames(2)="..\maps\Bonus03.xcm"
  3620.  
  3621. BonusMapNames(3)="..\maps\Bonus04.xcm"
  3622.  
  3623. BonusMapNames(4)="..\maps\Bonus05.xcm"
  3624.  
  3625. BonusMapNames(5)="..\maps\Bonus06.xcm"
  3626.  
  3627. NumBonusMaps=5
  3628.  
  3629. ZoneCameraDist=150.00
  3630.  
  3631. ZoneCameraPitch=-5000.00
  3632.  
  3633. PowerUpVisibility=1.00
  3634.  
  3635. StreakMultiplier=1.00
  3636.  
  3637. KillMult=1.00
  3638.  
  3639. ComboMult=2.00
  3640.  
  3641. ComboKillMult=2.00
  3642.  
  3643. MaxComboMult=4.00
  3644.  
  3645. StreakMult=1.00
  3646.  
  3647. MaxStreakMult=3.00
  3648.  
  3649. JumpSound=Sound'Effects.Jump_Step'
  3650.  
  3651. bSinglePlayer=True
  3652.  
  3653. bCheatsEnabled=True
  3654.  
  3655. bCanStrafe=True
  3656.  
  3657. bIsHuman=True
  3658.  
  3659. bIsMultiSkinned=True
  3660.  
  3661. MeleeRange=50.00
  3662.  
  3663. GroundSpeed=400.00
  3664.  
  3665. AirSpeed=400.00
  3666.  
  3667. AccelRate=2048.00
  3668.  
  3669. JumpZ=425.00
  3670.  
  3671. AirControl=0.35
  3672.  
  3673. BaseEyeHeight=27.00
  3674.  
  3675. EyeHeight=27.00
  3676.  
  3677. SelectionMesh="enforcer.EnforcerTrooper"
  3678.  
  3679. UnderWaterTime=20.00
  3680.  
  3681. Intelligence=3
  3682.  
  3683. HitSound1=Sound'Effects.GetHit1'
  3684.  
  3685. HitSound2=Sound'Effects.GetHit2'
  3686.  
  3687. Land=Sound'Effects.SoftLand'
  3688.  
  3689. WaterStep=Sound'Effects.Water_Step1'
  3690.  
  3691. PlayerReplicationInfoClass=Class'EnforcerPlayerReplicationInfo'
  3692.  
  3693. AnimSequence=WalkLg
  3694.  
  3695. DrawType=2
  3696.  
  3697. Style=5
  3698.  
  3699. Mesh=LodMesh'EnforcerTrooper'
  3700.  
  3701. DrawScale=1.25
  3702.  
  3703. AmbientGlow=17
  3704.  
  3705. SoundRadius=20
  3706.  
  3707. CollisionRadius=45.00
  3708.  
  3709. CollisionHeight=45.00
  3710.  
  3711. LightBrightness=70
  3712.  
  3713. LightHue=40
  3714.  
  3715. LightSaturation=128
  3716.  
  3717. LightRadius=6
  3718.  
  3719. Buoyancy=99.00
  3720.  
  3721. RotationRate=(Pitch=3072,Yaw=65000,Roll=2048),
  3722.  
  3723. }
  3724.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement