‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_load.csc
Go to the documentation of this file.
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 //Weapon registration
44 #using scripts\zm\gametypes\_weaponobjects;
45 
46 #namespace load;
47 
48 function ‪levelNotifyHandler(clientNum, state, oldState)
49 {
50  if(state != "")
51  {
52  level notify(state,clientNum);
53  }
54 }
55 
56 function ‪warnMissileLocking( localClientNum, ‪set )
57 {
58  /*if ( set && !(self islocalplayerviewlinked(localClientNum)) )
59  return;
60 
61  _helicopter_sounds::play_targeted_sound( set );*/
62 }
63 
64 function ‪warnMissileLocked( localClientNum, ‪set )
65 {
66  /*if ( set && !(self islocalplayerviewlinked(localClientNum)) )
67  return;
68 
69  _helicopter_sounds::play_locked_sound( set );*/
70 }
71 
72 function ‪warnMissileFired( localClientNum, ‪set )
73 {
74  /*if ( set && !(self islocalplayerviewlinked(localClientNum)) )
75  return;
76 
77  _helicopter_sounds::play_fired_sound( set );*/
78 }
79 
80 function ‪main()
81 {
82  ‪zm::init();
83 
84  level thread ‪server_time();
85  level thread ‪util::init_utility();
86 
88 
90 
91  level.createFX_disable_fx = (GetDvarInt("disable_fx") == 1);
92 
93  //level thread _dogs::init();
94  if ( ‪IS_TRUE( level._uses_sticky_grenades ) )
95  {
96  level thread ‪_sticky_grenade::main();
97  }
98 
99  ‪system::wait_till( "all" );
100 
101  level thread ‪load::art_review();
102 
103  level ‪flagsys::set( "load_main_complete" );
104 }
105 
106 function ‪server_time()
107 {
108  for (;;)
109  {
110  level.serverTime = getServerTime( 0 );
111  wait( 0.01 );
112  }
113 }
114 
116 {
117  //clientfield::register( "missile", "cf_m_proximity", VERSION_SHIP, 1, "int", &callback::callback_proximity, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
118  //clientfield::register( "missile", "cf_m_emp", VERSION_SHIP, 1, "int", &callback::callback_emp, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
119  //clientfield::register( "missile", "cf_m_stun", VERSION_SHIP, 1, "int", &callback::callback_stunned, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
120 
121  //clientfield::register( "scriptmover", "cf_s_emp", VERSION_SHIP, 1, "int", &callback::callback_emp, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
122  //clientfield::register( "scriptmover", "cf_s_stun", VERSION_SHIP, 1, "int", &callback::callback_stunned, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
123 
124  //clientfield::register( "world", "sndPrematch", VERSION_SHIP, 1, "int", &audio::sndMPPrematch, CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
125  //clientfield::register( "toplayer", "sndMelee", VERSION_SHIP, 1, "int", &audio::weapon_butt_sounds, CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
126  //clientfield::register( "toplayer", "sndEMP", VERSION_SHIP, 1, "int", &audio::sndEMP, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
127 
129 
130  ‪clientfield::register( "clientuimodel", "zmhud.swordEnergy", ‪VERSION_SHIP, 7, "float", undefined, !‪CF_HOST_ONLY, !‪CF_CALLBACK_ZERO_ON_NEW_ENT );
131  ‪clientfield::register( "clientuimodel", "zmhud.swordState", ‪VERSION_SHIP, 4, "int", undefined, !‪CF_HOST_ONLY, !‪CF_CALLBACK_ZERO_ON_NEW_ENT );
132  ‪clientfield::register( "clientuimodel", "zmhud.swordChargeUpdate", ‪VERSION_SHIP, 1, "counter", undefined, !‪CF_HOST_ONLY, !‪CF_CALLBACK_ZERO_ON_NEW_ENT );
133  //clientfield::register( "toplayer", "zmbLastStand", VERSION_SHIP, 1, "int", &zm_audio::sndZmbLaststand, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
134 }
‪register_clientfields
‪function register_clientfields()
Definition: _load.csc:150
‪warnMissileLocked
‪function warnMissileLocked(localClientNum, set)
Definition: _load.csc:64
‪art_review
‪function art_review()
Definition: load_shared.csc:28
‪CF_CALLBACK_ZERO_ON_NEW_ENT
‪#define CF_CALLBACK_ZERO_ON_NEW_ENT
Definition: version.gsh:103
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪warnMissileLocking
‪function warnMissileLocking(localClientNum, set)
Definition: _load.csc:56
‪main
‪function main()
Definition: _load.csc:103
‪register_system
‪function register_system(sSysName, cbFunc)
Definition: util_shared.csc:1074
‪init_utility
‪function init_utility()
Definition: util_shared.csc:1259
‪warnMissileFired
‪function warnMissileFired(localClientNum, set)
Definition: _load.csc:72
‪CF_HOST_ONLY
‪#define CF_HOST_ONLY
Definition: version.gsh:102
‪levelNotifyHandler
‪function levelNotifyHandler(clientNum, state, oldState)
Definition: _load.csc:95
‪wait_till
‪function wait_till(str_flag)
Definition: flag_shared.csc:189
‪Laststand
‪function Laststand(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _zm.csc:1536
‪init
‪function init()
Definition: struct.csc:1
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪server_time
‪function server_time()
Definition: _load.csc:106