1 #using scripts\codescripts\struct; 
    3 #using scripts\shared\callbacks_shared; 
    4 #using scripts\shared\math_shared; 
    5 #using scripts\shared\system_shared; 
    6 #using scripts\shared\util_shared; 
    7 #using scripts\shared\postfx_shared; 
    9 #insert scripts\shared\shared.gsh; 
   11 #precache( "client_fx", "weapon/fx_light_spike_launcher" ); 
   13 #namespace sticky_grenade; 
   19     level._effect[
"spike_light"] = 
"weapon/fx_light_spike_launcher";
 
   39     self notify( 
"light_disable" );
 
   41     self endon( 
"entityshutdown" );
 
   42     self endon( 
"light_disable" );
 
   61         interval = 
math::clamp( ( interval / 1.2 ), 0.08, 0.3 );
 
   67     player = GetLocalPlayer( localClientNum );
 
   69     self.fx = PlayFxOnTag( localClientNum, level._effect[
"spike_light"], 
self, 
"tag_fx" );
 
   74     if ( isdefined( 
self.fx ) && 
self.fx != 0 )
 
   76         StopFx( localClientNum, 
self.fx );
 
   83     spike_position = 
self.origin;
 
   85     while ( isdefined( 
self ) )
 
   90     if ( !IsIGCActive(localClientNum) )
 
   92         player = GetLocalPlayer( localClientNum );
 
   93         explosion_distance = DistanceSquared( spike_position, player.origin );
 
   95         if ( explosion_distance <= 
SQR( 450 ) )
 
   97             player thread postfx::PlayPostfxBundle( 
"pstfx_dust_chalk" );
 
   99         if ( explosion_distance <= 
SQR( 300 ) )
 
  101             player thread postfx::PlayPostfxBundle( 
"pstfx_dust_concrete" );