Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. claymoreDetonation()
  2. {
  3.     self endon( "death" );
  4.  
  5.     self waittill( "missile_stuck" );
  6.  
  7.     damagearea = spawn( "trigger_radius", self.origin + ( 0, 0, 0 - level.claymoreDetonateRadius ), 0, level.claymoreDetonateRadius, level.claymoreDetonateRadius * 2 );
  8.     self thread deleteOnDeath( damagearea );
  9.  
  10.     while ( 1 )
  11.     {
  12.         damagearea waittill( "trigger", player );
  13.  
  14.         if ( getdvarint( "scr_claymoredebug" ) != 1 )
  15.         {
  16.             if ( isdefined( self.owner ) && player == self.owner )
  17.                 continue;
  18.             if ( !friendlyFireCheck( self.owner, player, 0 ) )
  19.                 continue;
  20.         }
  21.         if ( lengthsquared( player getVelocity() ) < 10 )
  22.             continue;
  23.  
  24.         if ( !player shouldAffectClaymore( self ) )
  25.             continue;
  26.  
  27.         if ( player damageConeTrace( self.origin, self ) > 0 )
  28.             break;
  29.     }
  30.    
  31.     self playsound ("claymore_activated");
  32.    
  33.    
  34.     if ( player _hasPerk( "specialty_delaymine" ) )
  35.         wait 3.0;
  36.     else
  37.         wait level.claymoreDetectionGracePeriod;
  38.        
  39.     self detonate();
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement