 |
Black Ops 3 Source Code Explorer
0.1
An script explorer for Black Ops 3 by ZeRoY
|
Go to the documentation of this file. 1 #using scripts\codescripts\struct;
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\clientfield_shared;
5 #using scripts\shared\flagsys_shared;
6 #using scripts\shared\visionset_mgr_shared;
7 #using scripts\shared\spawner_shared;
9 #using scripts\shared\abilities\_ability_player;
10 #using scripts\shared\abilities\_ability_util;
12 #insert scripts\shared\shared.gsh;
13 #insert scripts\shared\version.gsh;
14 #insert scripts\shared\abilities\_ability_util.gsh;
16 #using scripts\shared\system_shared;
18 #precache( "eventstring", "hero_weapon_received" );
38 return self GadgetIsActive( slot );
44 return self GadgetFlickering( slot );
56 if ( !isdefined(
self.pers[
"held_hero_weapon_ammo_count"] ) )
58 self.pers[
"held_hero_weapon_ammo_count"] = [];
61 if( weapon.gadget_power_consume_on_ammo_use || !isdefined(
self.pers[
"held_hero_weapon_ammo_count"][weapon] ) )
63 self.pers[
"held_hero_weapon_ammo_count"][weapon] = 0;
66 self SetWeaponAmmoClip( weapon,
self.pers[
"held_hero_weapon_ammo_count"][weapon] );
68 n_ammo =
self GetAmmoCount( weapon );
72 stock =
self.pers[
"held_hero_weapon_ammo_count"][weapon] - n_ammo;
74 if ( stock > 0 && !weapon.isClipOnly )
76 self SetWeaponAmmoStock( weapon, stock );
83 self GadgetCharging( slot,
true );
107 self.heroweaponKillCount = 0;
109 self.heroweaponShots = 0;
110 self.heroweaponHits = 0;
113 if ( !weapon.gadget_power_consume_on_ammo_use )
123 if ( weapon.gadget_power_consume_on_ammo_use )
125 self SetWeaponAmmoClip( weapon, 0 );
131 if ( weapon.gadget_power_consume_on_ammo_use )
139 self GiveMaxAmmo( weapon );
140 self SetWeaponAmmoClip( weapon, weapon.clipSize );
152 self endon(
"disconnect" );
154 self notify(
"hero_ongameend" );
155 self endon(
"hero_ongameend" );
157 level waittill(
"game_ended");
159 if ( IsAlive(
self ) )
167 self endon(
"disconnect" );
169 self notify(
"hero_ondeath" );
170 self endon(
"hero_ondeath" );
172 self waittill(
"death" );
179 self.pers[
"held_hero_weapon_ammo_count"][weapon] =
self GetAmmoCount( weapon );
185 self endon(
"disconnect" );
186 self endon(
"death" );
188 self notify(
"hero_noammo" );
189 self endon(
"hero_noammo" );
195 n_ammo =
self GetAmmoCount( weapon );
203 self GadgetPowerReset( slot );
204 self GadgetCharging( slot,
true );
212 if ( IsDefined( time ) )
214 timeStr =
"^3" +
", time: " + time;
217 if ( GetDvarInt(
"scr_cpower_debug_prints" ) > 0 )
218 self IPrintlnBold(
"Hero Weapon " + weapon.name +
": " + status + timeStr );
function register_gadget_is_flickering_callbacks(type, flickering_func)
function hero_give_ammo(slot, weapon)
function hero_handle_ammo_save(slot, weapon)
function register_gadget_possession_callbacks(type, on_give, on_take)
#define GADGET_TYPE_HERO_WEAPON
function gadget_hero_weapon_on_spawn()
function gadget_hero_weapon_on_off(slot, weapon)
function hero_wait_for_game_end(slot, weapon)
function register_gadget_is_inuse_callbacks(type, inuse_func)
function register_gadget_flicker_callbacks(type, on_flicker)
function register_gadget_ready_callbacks(type, ready_func)
function gadget_hero_weapon_on_activate(slot, weapon)
function hero_wait_for_death(slot, weapon)
function register_gadget_activation_callbacks(type, turn_on, turn_off)
function hero_wait_for_out_of_ammo(slot, weapon)
#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
function hero_save_ammo(slot, weapon)
function gadget_hero_weapon_on_give(slot, weapon)
function gadget_hero_weapon_ready(slot, weapon)
function gadget_hero_weapon_on_connect()
function gadget_hero_weapon_is_inuse(slot)
function gadget_hero_weapon_on_flicker(slot, weapon)
function set_gadget_hero_weapon_status(weapon, status, time)
function gadget_hero_weapon_is_flickering(slot)
function gadget_hero_weapon_on_take(slot, weapon)