40 lines
1.0 KiB
Ucode
40 lines
1.0 KiB
Ucode
class repl_Nade extends Nade;
|
|
|
|
|
|
// remove smoke effects
|
|
simulated function Explode(vector HitLocation, vector HitNormal)
|
|
{
|
|
local PlayerController LocalPlayer;
|
|
local Projectile P;
|
|
local byte i;
|
|
|
|
bHasExploded = true;
|
|
BlowUp(HitLocation);
|
|
|
|
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.KFNadeExplosion',,, 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);
|
|
|
|
Destroy();
|
|
}
|
|
|
|
defaultproperties
|
|
{
|
|
}
|