mGm_Lizard

Team_GameBase.uc

Nov 16th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Team_GameBase extends TeamGame
  2.     dependson(Misc_PlayerDataManager_ServerLink)
  3.     dependson(Misc_PawnReplicationInfo)
  4.     dependson(Team_HUDBase)
  5.     dependson(Misc_Util)
  6.     dependson(Misc_Bot)
  7.     dependson(Misc_PlayerData)
  8.     dependson(TournamentModuleBase)
  9.     dependson(WeaponFire_Shield)
  10.     hidecategories(Movement,Collision,Lighting,LightColor,Karma,Force)
  11.     config
  12.     abstract;
  13.  
  14. enum EServerLinkStatus
  15. {
  16.     SL_DISABLED,
  17.     SL_READONLY,
  18.     SL_ENABLED
  19. };
  20.  
  21. struct SEndCeremonyInfo
  22. {
  23.     var string PlayerName;
  24.     var string CharacterName;
  25.     var int PlayerTeam;
  26.     var Vector SpawnPos;
  27.     var Rotator SpawnRot;
  28. };
  29.  
  30. struct ControllerArray
  31. {
  32.     var array<Controller> C;
  33. };
  34.  
  35. var config int StartingHealth;
  36. var config int StartingArmor;
  37. var config float MaxHealth;
  38. var config float AdrenalinePerDamage;
  39. var config float ScoreAwardPer10Damage;
  40. var config bool bDisableSpeed;
  41. var config bool bDisableBooster;
  42. var config bool bDisableInvis;
  43. var config bool bDisableBerserk;
  44. var array<string> EnabledCombos;
  45. var config bool bForceRUP;
  46. var config int ForceRUPMinPlayers;
  47. var config int ForceSeconds;
  48. var Controller DarkHorse;
  49. var string NextMapString;
  50. var byte Deaths[2];
  51. var bool bDefaultsReset;
  52. var config int SecsPerRound;
  53. var int RoundTime;
  54. var bool bRoundOT;
  55. var int RoundOTTime;
  56. var config int OTDamage;
  57. var config int OTInterval;
  58. var config float CampThreshold;
  59. var int CampInterval;
  60. var config bool bKickExcessiveCampers;
  61. var config int Timeouts;
  62. var byte TimeOutTeam;
  63. var PlayerController TimeOutPlayer;
  64. var int TeamTimeOuts[2];
  65. var int TimeOutCount;
  66. var float TimeOutRemainder;
  67. var float LastTimeOutUpdate;
  68. var config int TimeOutDuration;
  69. var bool bFirstSpawn;
  70. var bool bEndOfRound;
  71. var bool bRespawning;
  72. var int RespawnTime;
  73. var int NextRoundTime;
  74. var config int NextRoundDelay;
  75. var int CurrentRound;
  76. var config bool bModifyShieldGun;
  77. var config int AssaultAmmo;
  78. var config int AssaultGrenades;
  79. var config int BioAmmo;
  80. var config int ShockAmmo;
  81. var config int LinkAmmo;
  82. var config int MiniAmmo;
  83. var config int FlakAmmo;
  84. var config int RocketAmmo;
  85. var config int LightningAmmo;
  86. var config int EndOfRoundDelay;
  87. var int EndOfRoundTime;
  88. var PlayerReplicationInfo EndOfRoundScorer;
  89. var config bool RoundCanTie;
  90. var bool EndGameCalled;
  91. var config bool EnableNewNet;
  92. var TAM_Mutator MutTAM;
  93. var int WinningTeamIndex;
  94. var array<Controller> EndCeremonyRankings;
  95. var SEndCeremonyInfo ServerEndCeremonyInfo[10];
  96. var int EndCeremonyPlayerCount;
  97. var int EndCeremonySoundIdx;
  98. var config array<string> EndCeremonySound;
  99. var config bool EndCeremonyEnabled;
  100. var config bool EndCeremonyStatsEnabled;
  101. var int EndCeremonyTimer;
  102. var int EndCeremonyStatsListDisplayTime;
  103. var config bool AllowPersistentStatsWithBots;
  104. var Misc_PlayerDataManager_ServerLink PlayerDataManager_ServerLink;
  105. var bool DisablePersistentStatsForMatch;
  106. var bool MatchStatsRegistered;
  107. var config bool bSpawnProtectionOnRez;
  108. var config bool AutoBalanceTeams;
  109. var config int AutoBalanceSeconds;
  110. var config float AutoBalanceRandomization;
  111. var config float AutoBalanceAvgPPRWeight;
  112. var config bool AutoBalanceOnJoins;
  113. var config bool AllowForceAutoBalance;
  114. var config int ForceAutoBalanceCooldown;
  115. var int ForceAutoBalanceTimer;
  116. var bool TeamsAutoBalanced;
  117. var array<Controller> DontAutoBalanceList;
  118. var bool ForceAutoBalance;
  119. var config Team_GameBase.EServerLinkStatus ServerLinkStatus;
  120. var config string ServerLinkAddress;
  121. var config int ServerLinkPort;
  122. var config string ServerLinkAccount;
  123. var config string ServerLinkPassword;
  124. var config string ScoreboardCommunityName;
  125. var config string ScoreboardRedTeamName;
  126. var config string ScoreboardBlueTeamName;
  127. var config string ShieldTextureName;
  128. var config string FlagTextureName;
  129. var config bool ShowServerName;
  130. var config bool FlagTextureEnabled;
  131. var config bool FlagTextureShowAcronym;
  132. var config string SoundAloneName;
  133. var config string SoundSpawnProtectionName;
  134. var config bool AllowServerSaveSettings;
  135. var config bool AlwaysRestartServerWhenEmpty;
  136. var Sound OvertimeSound;
  137. var bool UseZAxisRadar;
  138. var config bool EnforceMaxPlayers;
  139. var TournamentModuleBase TournamentModule;
  140. var config string TournamentModule${1}< ${3} >
  141.  
  142. static function bool ReplaceLoadingScreen(PlayerController pcl, string MapName)
  143. {
  144.     local Object O;
  145.     local UT2K4ServerLoading LoadingScreenObj;
  146.     local Texture LoadingScreenTex;
  147.  
  148.     foreach pcl.AllObjects(class'Object', O)
  149.     {
  150.         if((LoadingScreenObj == none) && O.Class == class'UT2K4ServerLoading')
  151.         {
  152.             LoadingScreenObj = UT2K4ServerLoading(O);
  153.             break;
  154.         }        
  155.     }    
  156.     LoadingScreenTex = Texture(DynamicLoadObject("3SPNv3223TR.LS.loading" $ string(Rand(7) + 1), class'Texture', true));
  157.     if((LoadingScreenObj != none) && LoadingScreenTex != none)
  158.     {
  159.         DrawOpImage(LoadingScreenObj.Operations[0]).Image = LoadingScreenTex;
  160.         return true;
  161.     }
  162.     return false;
  163. }
  164.  
  165. static function string GetLoadingHint(PlayerController PlayerController, string MapName, Color ColorHint)
  166. {
  167.     if(ReplaceLoadingScreen(PlayerController, MapName))
  168.     {
  169.         return " ";
  170.     }
  171.     else
  172.     {
  173.         return super(GameInfo).GetLoadingHint(PlayerController, MapName, ColorHint);
  174.     }
  175. }
  176.  
  177. static function PrecacheGameTextures(LevelInfo myLevel)
  178. {
  179.     class'xTeamGame'.static.PrecacheGameTextures(myLevel);
  180. }
  181.  
  182. static function PrecacheGameStaticMeshes(LevelInfo myLevel)
  183. {
  184.     class'xDeathMatch'.static.PrecacheGameStaticMeshes(myLevel);
  185. }
  186.  
  187. function InitGameReplicationInfo()
  188. {
  189.     super(DeathMatch).InitGameReplicationInfo();
  190.     if(Misc_BaseGRI(GameReplicationInfo) == none)
  191.     {
  192.         return;
  193.     }
  194.     Misc_BaseGRI(GameReplicationInfo).RoundTime = SecsPerRound;
  195.     Misc_BaseGRI(GameReplicationInfo).StartingHealth = StartingHealth;
  196.     Misc_BaseGRI(GameReplicationInfo).StartingArmor = StartingArmor;
  197.     Misc_BaseGRI(GameReplicationInfo).MaxHealth = MaxHealth;
  198.     Misc_BaseGRI(GameReplicationInfo).SecsPerRound = SecsPerRound;
  199.     Misc_BaseGRI(GameReplicationInfo).OTDamage = OTDamage;
  200.     Misc_BaseGRI(GameReplicationInfo).OTInterval = OTInterval;
  201.     Misc_BaseGRI(GameReplicationInfo).CampThreshold = CampThreshold;
  202.     Misc_BaseGRI(GameReplicationInfo).bKickExcessiveCampers = bKickExcessiveCampers;
  203.     Misc_BaseGRI(GameReplicationInfo).bDisableSpeed = bDisableSpeed;
  204.     Misc_BaseGRI(GameReplicationInfo).bDisableInvis = bDisableInvis;
  205.     Misc_BaseGRI(GameReplicationInfo).bDisableBooster = bDisableBooster;
  206.     Misc_BaseGRI(GameReplicationInfo).bDisableBerserk = bDisableBerserk;
  207.     Misc_BaseGRI(GameReplicationInfo).bForceRUP = bForceRUP;
  208.     Misc_BaseGRI(GameReplicationInfo).ForceRUPMinPlayers = ForceRUPMinPlayers;
  209.     Misc_BaseGRI(GameReplicationInfo).Timeouts = Timeouts;
  210.     Misc_BaseGRI(GameReplicationInfo).Acronym = Acronym;
  211.     Misc_BaseGRI(GameReplicationInfo).EnableNewNet = EnableNewNet;
  212.     Misc_BaseGRI(GameReplicationInfo).ShieldTextureName = ShieldTextureName;
  213.     Misc_BaseGRI(GameReplicationInfo).FlagTextureName = FlagTextureName;
  214.     Misc_BaseGRI(GameReplicationInfo).ShowServerName = ShowServerName;
  215.     Misc_BaseGRI(GameReplicationInfo).FlagTextureEnabled = FlagTextureEnabled;
  216.     Misc_BaseGRI(GameReplicationInfo).FlagTextureShowAcronym = FlagTextureShowAcronym;
  217.     Misc_BaseGRI(GameReplicationInfo).SoundAloneName = SoundAloneName;
  218.     Misc_BaseGRI(GameReplicationInfo).SoundSpawnProtectionName = SoundSpawnProtectionName;
  219.     Misc_BaseGRI(GameReplicationInfo).ScoreboardCommunityName = ScoreboardCommunityName;
  220.     Misc_BaseGRI(GameReplicationInfo).ScoreboardRedTeamName = ScoreboardRedTeamName;
  221.     Misc_BaseGRI(GameReplicationInfo).ScoreboardBlueTeamName = ScoreboardBlueTeamName;
  222.     Misc_BaseGRI(GameReplicationInfo).UseZAxisRadar = UseZAxisRadar;
  223.     Misc_BaseGRI(GameReplicationInfo).ServerLinkStatus = ServerLinkStatus;
  224. }
Advertisement
Add Comment
Please, Sign In to add comment