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

52 lines
1.2 KiB
Ucode

//=============================================================================
// KF BloodJet.
//=============================================================================
class KFBloodJet extends BloodJet;
#exec OBJ LOAD File=KFX.utx
state Ticking
{
simulated function Tick( float dt )
{
if( LifeSpan < 1.0 )
{
mRegenRange[0] *= LifeSpan;
mRegenRange[1] = mRegenRange[0];
}
}
}
simulated function timer()
{
GotoState('Ticking');
}
simulated function PostNetBeginPlay()
{
SetTimer(LifeSpan - 1.0,false);
if ( Level.NetMode != NM_DedicatedServer )
WallSplat();
Super.PostNetBeginPlay();
}
simulated function WallSplat()
{
local vector WallHit, WallNormal;
local Actor WallActor;
if ( FRand() > 0.8 )
return;
WallActor = Trace(WallHit, WallNormal, Location + vect(0,0,-200), Location, false);
if ( WallActor != None )
spawn(SplatterClass,,,WallHit + 20 * (WallNormal + VRand()), rotator(-WallNormal));
}
defaultproperties
{
mNumTileColumns=4
mNumTileRows=4
Skins(0)=Texture'KFX.BloodySpray'
Style_STY_Modulated
}