rott/kf_sources/KFMod/Classes/FlameNade.uc
2026-07-14 20:27:09 +07:00

36 lines
1.1 KiB
Ucode

//=============================================================================
// FlameNade
//=============================================================================
class FlameNade extends Nade;
#exec OBJ LOAD FILE=KF_GrenadeSnd.uax
simulated function Explode(vector HitLocation, vector HitNormal)
{
local PlayerController LocalPlayer;
bHasExploded = True;
BlowUp(HitLocation);
// Incendiary Effects..
PlaySound(sound'KF_GrenadeSnd.FlameNade_Explode',,100.5*TransientSoundVolume);
if ( EffectIsRelevant(Location,false) )
{
Spawn(Class'KFIncendiaryExplosion',,, 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
{
Damage=80.000000
MyDamageType=Class'DamTypeFlameNade'
}