Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. simulated function Explode(vector HitLocation, vector HitNormal)
  2. {
  3.     local EXUSpriteBallExplosion s;
  4.     local ScriptedPawn Subject;
  5.     local ScriptedPawn Winner;
  6.     local vector Start;
  7.    
  8.     Start = Location + 15 * HitNormal;
  9.     Winner = class<ScriptedPawn>Candidates[Rand(10)];
  10.    
  11.     if( bExploded )
  12.         return;
  13.     bExploded = True;
  14.  
  15.     if( Instigator!=none )
  16.         MakeNoise(1.0);
  17.  
  18.     if(Role==ROLE_Authority)
  19.     {
  20.         Subject = Spawn(,,, Start);
  21.         if (Subject!=none)
  22.         {
  23.             Subject.Falling();
  24.             if(!Subject.bCanFly && Subject.Physics!=PHYS_Falling)
  25.             {
  26.                 Subject.SetPhysics(PHYS_Falling);
  27.             }
  28.         }
  29.     }
  30.  
  31.     if(Level.Netmode!=NM_DedicatedServer)
  32.     {
  33.     s = Spawn(class'PurpleSpriteBallExplosion',,, Start);
  34.         if (s!=none)
  35.             s.DrawScale = 3.0;
  36.  
  37.         PlaySound(ImpactSound,, 12,, 2200);
  38.     }
  39.    
  40.     if( s!=none )
  41.         s.RemoteRole = ROLE_None;
  42.  
  43.     PlaySound(MiscSound,, 12,, 2200);
  44.  
  45.     if( !bDeleteMe || Level.Netmode!=NM_Client )
  46.         Destroy();
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement