class repl_PipeProj extends KFMod.PipeBombProjectile;


simulated function Explode(vector HitLocation, vector HitNormal)
{
  local PlayerController LocalPlayer;
  local Projectile P;
  local byte i;

  bHasExploded = true;
  BlowUp(HitLocation);

  bTriggered = true;

  if (Role == ROLE_Authority)
  {
    SetTimer(0.1, false);
    NetUpdateTime = Level.TimeSeconds - 1;
  }

  PlaySound(ExplodeSounds[rand(ExplodeSounds.length)],,2.0);

  // Shrapnel
  for (i = Rand(6); i < 10; i++)
  {
    P = Spawn(ShrapnelClass,,,,RotRand(true));
    if (P != none)
      P.RemoteRole = ROLE_None;
  }
  if (!class'Settings'.default.bRemoveSmoke && EffectIsRelevant(Location,false))
  {
    Spawn(Class'KFMod.KFNadeLExplosion',,, HitLocation, rotator(vect(0,0,1)));
    Spawn(ExplosionDecal,self,,HitLocation, rotator(-HitNormal));
  }

  // Shake nearby players screens
  LocalPlayer = Level.GetLocalPlayerController();
  if ((LocalPlayer != none) && (VSize(Location - LocalPlayer.ViewTarget.Location) < (DamageRadius * 1.5)))
    LocalPlayer.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);

  if (Role < ROLE_Authority)
    Destroy();
}

defaultproperties
{
}
