Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.44 KB | None | 0 0
  1. #using scripts\codescripts\struct;
  2.  
  3. #using scripts\shared\audio_shared;
  4. #using scripts\shared\clientfield_shared;
  5. #using scripts\shared\exploder_shared;//DO NOT REMOVE - needed for system registration
  6. #using scripts\shared\flag_shared;
  7. #using scripts\shared\flagsys_shared;
  8. #using scripts\shared\fx_shared;
  9. #using scripts\shared\demo_shared;
  10. #using scripts\shared\hud_message_shared;
  11. #using scripts\shared\load_shared;
  12. #using scripts\shared\lui_shared;
  13. #using scripts\shared\music_shared;
  14. #using scripts\shared\_oob;
  15. #using scripts\shared\scene_shared;
  16. #using scripts\shared\serverfaceanim_shared;
  17. #using scripts\shared\system_shared;
  18. #using scripts\shared\turret_shared;
  19. #using scripts\shared\util_shared;
  20. #using scripts\shared\vehicle_shared;
  21. #using scripts\shared\archetype_shared\archetype_shared;
  22.  
  23. //Abilities
  24. #using scripts\shared\abilities\_ability_player; //DO NOT REMOVE - needed for system registration
  25.  
  26. #insert scripts\shared\shared.gsh;
  27. #insert scripts\shared\version.gsh;
  28.  
  29. #using scripts\shared\ai\zombie_utility;
  30.  
  31. #using scripts\zm\_zm;
  32. #using scripts\zm\gametypes\_spawnlogic;
  33.  
  34. #using scripts\zm\_destructible;
  35. #using scripts\zm\_util;
  36.  
  37. //REGISTRATION - These scripts are initialized here
  38. //Do not remove unless you are removing the script from the game
  39.  
  40. //Gametypes Registration
  41. #using scripts\zm\gametypes\_clientids;
  42. #using scripts\zm\gametypes\_scoreboard;
  43. #using scripts\zm\gametypes\_serversettings;
  44. #using scripts\zm\gametypes\_shellshock;
  45. #using scripts\zm\gametypes\_spawnlogic;
  46. #using scripts\zm\gametypes\_spectating;
  47. #using scripts\zm\gametypes\_weaponobjects;
  48.  
  49. //Systems registration
  50. #using scripts\zm\_art;
  51. #using scripts\zm\_callbacks;
  52. #using scripts\zm\_zm_audio;
  53. #using scripts\zm\_zm_behavior;
  54. #using scripts\zm\_zm_blockers;
  55. #using scripts\zm\_zm_bot;
  56. #using scripts\zm\_zm_clone;
  57. #using scripts\zm\_zm_devgui;
  58. #using scripts\zm\_zm_magicbox;
  59. #using scripts\zm\_zm_playerhealth;
  60. #using scripts\zm\_zm_power;
  61. #using scripts\zm\_zm_score;
  62. #using scripts\zm\_zm_stats;
  63. #using scripts\zm\_zm_traps;
  64. #using scripts\zm\_zm_unitrigger;
  65. #using scripts\zm\_zm_zonemgr;
  66.  
  67. #using scripts\zm\zm_moreguns;
  68.  
  69. //Weapon registration
  70. #using scripts\zm\gametypes\_weaponobjects;
  71.  
  72. #precache( "fx", "_t6/bio/player/fx_footstep_dust" );
  73. #precache( "fx", "_t6/bio/player/fx_footstep_sand" );
  74. #precache( "fx", "_t6/bio/player/fx_footstep_mud" );
  75. #precache( "fx", "_t6/bio/player/fx_footstep_water" );
  76.  
  77. #namespace load;
  78.  
  79. function main()
  80. {
  81. zm::init();
  82. zm_moreguns::init();
  83.  
  84. level._loadStarted = true;
  85.  
  86. register_clientfields();
  87.  
  88. level.aiTriggerSpawnFlags = getaitriggerflags();
  89. level.vehicleTriggerSpawnFlags = getvehicletriggerflags();
  90.  
  91. level thread start_intro_screen_zm();
  92.  
  93. //thread _spawning::init();
  94. //thread _deployable_weapons::init();
  95. //thread _minefields::init();
  96. //thread _rotating_object::init();
  97. //thread _shutter::main();
  98. //thread _flare::init();
  99. //thread _pipes::main();
  100. //thread _vehicles::init();
  101. //thread _dogs::init();
  102. //thread _tutorial::init();
  103.  
  104. setup_traversals();
  105.  
  106. footsteps();
  107.  
  108. system::wait_till( "all" );
  109.  
  110. level thread load::art_review();
  111.  
  112. level flagsys::set( "load_main_complete" );
  113. }
  114.  
  115. function footsteps()
  116. {
  117. if ( IS_TRUE( level.FX_exclude_footsteps ) )
  118. {
  119. return;
  120. }
  121.  
  122. zombie_utility::setFootstepEffect( "asphalt", "_t6/bio/player/fx_footstep_dust" );
  123. zombie_utility::setFootstepEffect( "brick", "_t6/bio/player/fx_footstep_dust" );
  124. zombie_utility::setFootstepEffect( "carpet", "_t6/bio/player/fx_footstep_dust" );
  125. zombie_utility::setFootstepEffect( "cloth", "_t6/bio/player/fx_footstep_dust" );
  126. zombie_utility::setFootstepEffect( "concrete", "_t6/bio/player/fx_footstep_dust" );
  127. zombie_utility::setFootstepEffect( "dirt", "_t6/bio/player/fx_footstep_sand" );
  128. zombie_utility::setFootstepEffect( "foliage", "_t6/bio/player/fx_footstep_sand" );
  129. zombie_utility::setFootstepEffect( "gravel", "_t6/bio/player/fx_footstep_dust" );
  130. zombie_utility::setFootstepEffect( "grass", "_t6/bio/player/fx_footstep_dust" );
  131. zombie_utility::setFootstepEffect( "metal", "_t6/bio/player/fx_footstep_dust" );
  132. zombie_utility::setFootstepEffect( "mud", "_t6/bio/player/fx_footstep_mud" );
  133. zombie_utility::setFootstepEffect( "paper", "_t6/bio/player/fx_footstep_dust" );
  134. zombie_utility::setFootstepEffect( "plaster", "_t6/bio/player/fx_footstep_dust" );
  135. zombie_utility::setFootstepEffect( "rock", "_t6/bio/player/fx_footstep_dust" );
  136. zombie_utility::setFootstepEffect( "sand", "_t6/bio/player/fx_footstep_sand" );
  137. zombie_utility::setFootstepEffect( "water", "_t6/bio/player/fx_footstep_water" );
  138. zombie_utility::setFootstepEffect( "wood", "_t6/bio/player/fx_footstep_dust" );
  139. }
  140.  
  141. function setup_traversals()
  142. {
  143. /*
  144. potential_traverse_nodes = GetAllNodes();
  145. for (i = 0; i < potential_traverse_nodes.size; i++)
  146. {
  147. node = potential_traverse_nodes[i];
  148. if (node.type == "Begin")
  149. {
  150. node zombie_shared::init_traverse();
  151. }
  152. }
  153. */
  154. }
  155.  
  156. function start_intro_screen_zm( )
  157. {
  158. players = GetPlayers();
  159. for(i = 0; i < players.size; i++)
  160. {
  161. players[i] lui::screen_fade_out( 0, undefined );
  162. players[i] freezecontrols(true);
  163. }
  164. wait 1;
  165. }
  166.  
  167. function register_clientfields()
  168. {
  169. //clientfield::register( "missile", "cf_m_proximity", VERSION_SHIP, 1, "int" );
  170. //clientfield::register( "missile", "cf_m_emp", VERSION_SHIP, 1, "int" );
  171. //clientfield::register( "missile", "cf_m_stun", VERSION_SHIP, 1, "int" );
  172.  
  173. //clientfield::register( "scriptmover", "cf_s_emp", VERSION_SHIP, 1, "int" );
  174. //clientfield::register( "scriptmover", "cf_s_stun", VERSION_SHIP, 1, "int" );
  175.  
  176. //clientfield::register( "world", "sndPrematch", VERSION_SHIP, 1, "int" );
  177. //clientfield::register( "toplayer", "sndMelee", VERSION_SHIP, 1, "int" );
  178. //clientfield::register( "toplayer", "sndEMP", VERSION_SHIP, 1, "int" );
  179.  
  180. clientfield::register( "allplayers", "zmbLastStand", VERSION_SHIP, 1, "int" );
  181. //clientfield::register( "toplayer", "zmbLastStand", VERSION_SHIP, 1, "int" );
  182.  
  183. clientfield::register( "clientuimodel", "zmhud.swordEnergy", VERSION_SHIP, 7, "float" ); // energy: 0 to 1
  184. clientfield::register( "clientuimodel", "zmhud.swordState", VERSION_SHIP, 4, "int" ); // state: 0 = hidden, 1 = charging, 2 = ready, 3 = inuse, 4 = unavailable (grey), 5 = ele-charging, 6 = ele-ready, 7 = ele-inuse,
  185. clientfield::register( "clientuimodel", "zmhud.swordChargeUpdate", VERSION_SHIP, 1, "counter" );
  186. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement