‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_explosive_bolt.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\system_shared;
5 #using scripts\shared\util_shared;
6 #using scripts\shared\weapons\_weapons;
7 
8 #insert scripts\shared\shared.gsh;
9 
10 #using scripts\mp\_util;
11 
12 #precache( "fx", "weapon/fx_equip_light_os" );
13 
14 #namespace explosive_bolt;
15 
16 ‪REGISTER_SYSTEM( "explosive_bolt", &‪__init__, undefined )
17 
18 function ‪__init__()
19 {
21 }
22 
24 {
25  self thread ‪begin_other_grenade_tracking();
26 }
27 
29 {
30  self endon( "death" );
31  self endon( "disconnect" );
32 
33  self notify( "boltTrackingStart" );
34  self endon( "boltTrackingStart" );
35 
36  weapon_bolt = GetWeapon( "explosive_bolt" );
37 
38  for (;;)
39  {
40  self waittill ( "grenade_fire", grenade, weapon, cookTime );
41 
42  if ( grenade ‪util::isHacked() )
43  {
44  continue;
45  }
46 
47  if ( weapon == weapon_bolt )
48  {
49  grenade.ownerWeaponAtLaunch = self.currentWeapon;
50  grenade.ownerAdsAtLaunch = ( self PlayerAds() == 1 ? true : false );
51  grenade thread ‪watch_bolt_detonation( self );
52  grenade thread ‪weapons::check_stuck_to_player( true, false, weapon );
53  }
54  }
55 }
56 
57 function ‪watch_bolt_detonation( owner ) // self == explosive_bolt entity
58 {
59  //self SetTeam( owner.team );
60 }
‪on_player_spawned
‪function on_player_spawned()
Definition: _explosive_bolt.gsc:23
‪__init__
‪function __init__()
Definition: _explosive_bolt.gsc:18
‪check_stuck_to_player
‪function check_stuck_to_player(deleteOnTeamChange, awardScoreEvent, weapon)
Definition: _weapons.gsc:873
‪begin_other_grenade_tracking
‪function begin_other_grenade_tracking()
Definition: _explosive_bolt.gsc:28
‪watch_bolt_detonation
‪function watch_bolt_detonation(owner)
Definition: _explosive_bolt.gsc:57
‪on_spawned
‪function on_spawned(func, obj)
Definition: callbacks_shared.csc:245
‪REGISTER_SYSTEM
‪#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
Definition: shared.gsh:204
‪isHacked
‪function isHacked()
Definition: util_shared.gsc:2493