‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_shellshock.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\util_shared;
5 #using scripts\shared\system_shared;
6 
7 #insert scripts\shared\shared.gsh;
8 
9 #using scripts\zm\_util;
10 
11 #namespace shellshock;
12 
13 ‪REGISTER_SYSTEM( "shellshock", &‪__init__, undefined )
14 
15 function ‪__init__()
16 {
18 
19  level.shellshockOnPlayerDamage = &‪on_damage;
20 }
21 
22 function ‪main()
23 {
24 }
25 
26 function ‪on_damage( cause, ‪damage, weapon )
27 {
28  //if ( self _flashgrenades::isFlashbanged() )
29  // return; // don't interrupt flashbang shellshock
30 
31  if ( cause == "MOD_EXPLOSIVE" ||
32  cause == "MOD_GRENADE" ||
33  cause == "MOD_GRENADE_SPLASH" ||
34  cause == "MOD_PROJECTILE" ||
35  cause == "MOD_PROJECTILE_SPLASH" )
36  {
37  time = 0;
38 
39  if(‪damage >= 90)
40  time = 4;
41  else if(‪damage >= 50)
42  time = 3;
43  else if(‪damage >= 25)
44  time = 2;
45  else if(‪damage > 10)
46  time = 2;
47 
48  if ( time )
49  {
50  if ( self ‪util::mayApplyScreenEffect() )
51  self shellshock("frag_grenade_mp", 0.5);
52  }
53  }
54 }
55 
56 function ‪endOnDeath()
57 {
58  self waittill( "death" );
59  waittillframeend;
60  self notify ( "end_explode" );
61 }
62 
64 {
65  self endon( "disconnect" );
66 
67  wait( ‪timer );
68  self notify( "end_on_timer" );
69 }
70 
71 function ‪rcbomb_earthQuake(position)
72 {
73  PlayRumbleOnPosition( "grenade_rumble", position );
74  Earthquake( 0.5, 0.5, self.origin, 512 );
75 }
‪timer
‪function timer(n_time, str_endon, x, y, height)
Definition: lui_shared.gsc:163
‪on_start_gametype
‪function on_start_gametype(func, obj)
Definition: callbacks_shared.csc:285
‪rcbomb_earthQuake
‪function rcbomb_earthQuake(position)
Definition: _shellshock.gsc:71
‪damage
‪function damage(trap)
Definition: _zm_trap_electric.gsc:116
‪__init__
‪function __init__()
Definition: _shellshock.gsc:16
‪on_damage
‪function on_damage(cause, damage, weapon)
Definition: _shellshock.gsc:27
‪REGISTER_SYSTEM
‪#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
Definition: shared.gsh:204
‪endOnDeath
‪function endOnDeath()
Definition: _shellshock.gsc:56
‪endOnTimer
‪function endOnTimer(timer)
Definition: _shellshock.gsc:63
‪main
‪function main()
Definition: _shellshock.gsc:22
‪mayApplyScreenEffect
‪function mayApplyScreenEffect()
Definition: util_shared.gsc:2613