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

60 lines
1.3 KiB
Ucode

class repl_ProjFlare extends FlareRevolverProjectile;
simulated function PostBeginPlay()
{
// if (Level.NetMode != NM_DedicatedServer && !PhysicsVolume.bWaterVolume)
// FlameTrail = Spawn(FlameTrailEmitterClass,self);
// turn off pulsating lights, perf +++
bDynamicLight = false;
LightType = LT_None;
OrigLoc = Location;
if (!bDud)
{
Dir = vector(Rotation);
Velocity = speed * Dir;
}
super(ROBallisticProjectile).PostBeginPlay();
}
simulated function Explode(vector HitLocation, vector HitNormal)
{
bHasExploded = true;
// Don't explode if this is a dud
if (bDud)
{
Velocity = vect(0,0,0);
LifeSpan = 1.0;
SetPhysics(PHYS_Falling);
}
PlaySound(ExplosionSound,,ExplosionSoundVolume);
// if (EffectIsRelevant(Location,false))
// {
// Spawn(ExplosionEmitter,,,HitLocation + HitNormal*20,rotator(HitNormal));
// Spawn(ExplosionDecal,self,,HitLocation, rotator(-HitNormal));
// }
BlowUp(HitLocation);
Destroy();
// let's remove our client code, server will try to do shaking anyways
}
// so we prevent shaking from this function
simulated function float GetShakeScale(vector ViewLocation, vector EventLocation)
{
return 0.0f;
}
defaultproperties
{
}