Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. #using scripts\codescripts\struct;
  2.  
  3. #using scripts\shared\audio_shared;
  4. #using scripts\shared\clientfaceanim_shared;//DO NOT REMOVE - needed for system registration
  5. #using scripts\shared\clientfield_shared;
  6. #using scripts\shared\flagsys_shared;
  7. #using scripts\shared\fx_shared;//DO NOT REMOVE - needed for system registration
  8. #using scripts\shared\footsteps_shared;//DO NOT REMOVE - needed for system registration
  9. #using scripts\shared\load_shared;
  10. #using scripts\shared\music_shared;
  11. #using scripts\shared\_oob;
  12. #using scripts\shared\scene_shared;
  13. #using scripts\shared\system_shared;
  14. #using scripts\shared\turret_shared;
  15. #using scripts\shared\util_shared;
  16. #using scripts\shared\vehicle_shared;
  17. #using scripts\shared\archetype_shared\archetype_shared;
  18.  
  19. //Abilities
  20. #using scripts\shared\abilities\_ability_player; //DO NOT REMOVE - needed for system registration
  21.  
  22. #insert scripts\shared\shared.gsh;
  23. #insert scripts\shared\version.gsh;
  24.  
  25. #using scripts\zm\_destructible;
  26. #using scripts\zm\_callbacks;
  27. #using scripts\zm\_sticky_grenade;
  28. #using scripts\shared\util_shared;
  29.  
  30. //System registration
  31. #using scripts\zm\_ambient;
  32. #using scripts\zm\_global_fx;
  33. #using scripts\zm\_radiant_live_update;
  34. #using scripts\zm\_zm;
  35. #using scripts\zm\_zm_audio;
  36. #using scripts\zm\_zm_magicbox;
  37. #using scripts\zm\_zm_score;
  38. #using scripts\zm\_zm_traps;
  39. #using scripts\zm\_zm_playerhealth;
  40. #using scripts\zm\gametypes\_weaponobjects;
  41. #using scripts\zm\craftables\_zm_craftables;
  42.  
  43. #using scripts\zm\zm_moreguns;
  44.  
  45. //Weapon registration
  46. #using scripts\zm\gametypes\_weaponobjects;
  47.  
  48. #namespace load;
  49.  
  50. function levelNotifyHandler(clientNum, state, oldState)
  51. {
  52. if(state != "")
  53. {
  54. level notify(state,clientNum);
  55. }
  56. }
  57.  
  58. function warnMissileLocking( localClientNum, set )
  59. {
  60. /*if ( set && !(self islocalplayerviewlinked(localClientNum)) )
  61. return;
  62.  
  63. _helicopter_sounds::play_targeted_sound( set );*/
  64. }
  65.  
  66. function warnMissileLocked( localClientNum, set )
  67. {
  68. /*if ( set && !(self islocalplayerviewlinked(localClientNum)) )
  69. return;
  70.  
  71. _helicopter_sounds::play_locked_sound( set );*/
  72. }
  73.  
  74. function warnMissileFired( localClientNum, set )
  75. {
  76. /*if ( set && !(self islocalplayerviewlinked(localClientNum)) )
  77. return;
  78.  
  79. _helicopter_sounds::play_fired_sound( set );*/
  80. }
  81.  
  82. function main()
  83. {
  84. zm_moreguns::init();
  85. zm::init();
  86. level thread server_time();
  87. level thread util::init_utility();
  88.  
  89. util::register_system("levelNotify",&levelNotifyHandler);
  90.  
  91. register_clientfields();
  92.  
  93. level.createFX_disable_fx = (GetDvarInt("disable_fx") == 1);
  94.  
  95. //level thread _dogs::init();
  96. if ( IS_TRUE( level._uses_sticky_grenades ) )
  97. {
  98. level thread _sticky_grenade::main();
  99. }
  100.  
  101. system::wait_till( "all" );
  102.  
  103. level thread load::art_review();
  104.  
  105. level flagsys::set( "load_main_complete" );
  106. }
  107.  
  108. function server_time()
  109. {
  110. for (;;)
  111. {
  112. level.serverTime = getServerTime( 0 );
  113. wait( 0.01 );
  114. }
  115. }
  116.  
  117. function register_clientfields()
  118. {
  119. //clientfield::register( "missile", "cf_m_proximity", VERSION_SHIP, 1, "int", &callback::callback_proximity, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  120. //clientfield::register( "missile", "cf_m_emp", VERSION_SHIP, 1, "int", &callback::callback_emp, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  121. //clientfield::register( "missile", "cf_m_stun", VERSION_SHIP, 1, "int", &callback::callback_stunned, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  122.  
  123. //clientfield::register( "scriptmover", "cf_s_emp", VERSION_SHIP, 1, "int", &callback::callback_emp, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  124. //clientfield::register( "scriptmover", "cf_s_stun", VERSION_SHIP, 1, "int", &callback::callback_stunned, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  125.  
  126. //clientfield::register( "world", "sndPrematch", VERSION_SHIP, 1, "int", &audio::sndMPPrematch, CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  127. //clientfield::register( "toplayer", "sndMelee", VERSION_SHIP, 1, "int", &audio::weapon_butt_sounds, CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
  128. //clientfield::register( "toplayer", "sndEMP", VERSION_SHIP, 1, "int", &audio::sndEMP, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
  129.  
  130. clientfield::register( "allplayers", "zmbLastStand", VERSION_SHIP, 1, "int", &zm::Laststand, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
  131.  
  132. clientfield::register( "clientuimodel", "zmhud.swordEnergy", VERSION_SHIP, 7, "float", undefined, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  133. clientfield::register( "clientuimodel", "zmhud.swordState", VERSION_SHIP, 4, "int", undefined, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  134. clientfield::register( "clientuimodel", "zmhud.swordChargeUpdate", VERSION_SHIP, 1, "counter", undefined, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
  135. //clientfield::register( "toplayer", "zmbLastStand", VERSION_SHIP, 1, "int", &zm_audio::sndZmbLaststand, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
  136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement