Files
UT2k4-Mod-ChaChaGrapple/Sources/Classes/ChaChaGrappleGrappleRope.uc
2022-12-03 13:21:40 +00:00

99 lines
2.3 KiB
Ucode

//-----------------------------------------------------------
// ChaCha 2022
// ==========================================================
// Extracted and adapted from UT-2003 jasonyu Work (Seismic):
//-----------------------------------------------------------
class ChaChaGrappleGrappleRope extends xEmitter;
#EXEC OBJ LOAD FILE=InterfaceContent.utx
#exec OBJ LOAD File=XGameShadersB.utx
var ChaChaGrappleGrappleHook Hook;
var Vector StartEffect, EndEffect;
var Vector EffectOffset;
replication
{
reliable if (Role < ROLE_Authority)
StartEffect, EndEffect;
reliable if (Role == ROLE_Authority)
Hook;
}
simulated function SetHook(ChaChaGrappleGrappleHook _Hook)
{
//Log("ChaChaGrappleGrappleRope.SetHook()");
//Log(_Hook);
Hook = _Hook;
}
simulated function PostBeginPlay()
{
Super.PostBeginPlay();
//Log("ChaChaGrappleGrappleRope.PostBeginPlay()2");
if (Role < ROLE_Authority)
{
Destroy();
return;
}
//Log(Role);
//Log(bNetOwner);
//Log(Instigator);
//Log("ChaChaGrappleGrappleRope.PostBeginPlay() END");
}
simulated function Tick(float dt)
{
//Log("ChaChaGrappleGrappleRope.Tick()");
//Log(Hook);
//Log(Instigator);
if (Role == ROLE_Authority && (Instigator == None || Instigator.Controller == None))
{
Destroy();
return;
}
//Log("Hook.Location "$Hook.Location);
SetLocation( Instigator.Location );
if(Hook!=None) mSpawnVecA = Hook.Location;
else mSpawnVecA = Instigator.Location;
}
defaultproperties
{
mParticleType=PT_Beam
mMaxParticles=1
mRegenDist=65.000000 // style electrique
mSpinRange(0)=45000.000000
mSizeRange(0)=11.000000
mColorRange(0)=(B=240,G=240,R=240)
mColorRange(1)=(B=240,G=240,R=240)
mAttenuate=Faux
mAttenKa=0.000000
mWaveFrequency=0.060000
mWaveAmplitude=8.000000 // style d'ondulation (bruit ?)
mWaveShift=100000.000000
mBendStrength=3.000000
mWaveLockEnd=Vrai
LightType=LT_Steady
LightHue=100
LightSaturation=100
LightBrightness=255.000000
LightRadius=4.000000
bDynamicLight=Vrai
bNetTemporary=Faux
bReplicateInstigator=Vrai
bReplicateMovement=Vrai
RemoteRole=ROLE_SimulatedProxy
Skins(0)=FinalBlend'XEffectMat.Link.LinkBeamBlueFB'
Style=STY_Additive
}