133 lines
3.4 KiB
Ucode
133 lines
3.4 KiB
Ucode
//=============================================================================
|
|
// rocket.
|
|
//=============================================================================
|
|
class UT2341RocketProj extends Projectile;
|
|
|
|
var bool bRing,bHitWater,bWaterStart;
|
|
var int NumExtraRockets;
|
|
var Emitter SmokeTrail;
|
|
var Effects Corona;
|
|
|
|
var vector Dir;
|
|
|
|
simulated function Destroyed()
|
|
{
|
|
if ( SmokeTrail != None )
|
|
SmokeTrail.Kill();
|
|
if ( Corona != None )
|
|
Corona.Destroy();
|
|
Super.Destroyed();
|
|
}
|
|
|
|
simulated function PostBeginPlay()
|
|
{
|
|
if ( Level.NetMode != NM_DedicatedServer)
|
|
{
|
|
SmokeTrail = Spawn(class'FX_RocketTrail',self,,,Rotation);
|
|
SmokeTrail.SetBase(self);
|
|
}
|
|
|
|
Dir = vector(Rotation);
|
|
Velocity = speed * Dir;
|
|
if (PhysicsVolume.bWaterVolume)
|
|
{
|
|
bHitWater = True;
|
|
Velocity=0.6*Velocity;
|
|
}
|
|
Super.PostBeginPlay();
|
|
}
|
|
|
|
simulated function PostNetBeginPlay()
|
|
{
|
|
local PlayerController PC;
|
|
|
|
Super.PostNetBeginPlay();
|
|
|
|
if ( Level.NetMode == NM_DedicatedServer )
|
|
return;
|
|
if ( Level.bDropDetail || (Level.DetailMode == DM_Low) )
|
|
{
|
|
bDynamicLight = false;
|
|
LightType = LT_None;
|
|
}
|
|
else
|
|
{
|
|
PC = Level.GetLocalPlayerController();
|
|
if ( (Instigator != None) && (PC == Instigator.Controller) )
|
|
return;
|
|
if ( (PC == None) || (PC.ViewTarget == None) || (VSize(PC.ViewTarget.Location - Location) > 3000) )
|
|
{
|
|
bDynamicLight = false;
|
|
LightType = LT_None;
|
|
}
|
|
}
|
|
}
|
|
|
|
simulated function Landed( vector HitNormal )
|
|
{
|
|
Explode(Location,HitNormal);
|
|
}
|
|
|
|
simulated function ProcessTouch (Actor Other, Vector HitLocation)
|
|
{
|
|
if ( (Other != instigator) && (!Other.IsA('Projectile') || Other.bProjTarget) )
|
|
Explode(HitLocation, vector(rotation)*-1 );
|
|
}
|
|
|
|
function BlowUp(vector HitLocation)
|
|
{
|
|
HurtRadius(Damage, DamageRadius, MyDamageType, MomentumTransfer, HitLocation );
|
|
MakeNoise(1.0);
|
|
}
|
|
|
|
simulated function Explode(vector HitLocation, vector HitNormal)
|
|
{
|
|
local PlayerController PC;
|
|
|
|
PlaySound(sound'UT2341Weapons_Sounds.General.Explo1',,2.5*TransientSoundVolume);
|
|
if ( EffectIsRelevant(Location,false) )
|
|
{
|
|
Spawn(class'FX_RocketExplosion',,,HitLocation + HitNormal*10,rotator(HitNormal));
|
|
PC = Level.GetLocalPlayerController();
|
|
if ( (PC.ViewTarget != None) && VSize(PC.ViewTarget.Location - Location) < 5000 )
|
|
Spawn(class'ExplosionCrap',,, HitLocation + HitNormal*20, rotator(HitNormal));
|
|
// if ( (ExplosionDecal != None) && (Level.NetMode != NM_DedicatedServer) )
|
|
// Spawn(ExplosionDecal,self,,Location, rotator(-HitNormal));
|
|
}
|
|
|
|
BlowUp(HitLocation);
|
|
Destroy();
|
|
}
|
|
|
|
defaultproperties
|
|
{
|
|
Speed=1035.000000
|
|
MaxSpeed=1840.000000
|
|
Damage=112.000000
|
|
DamageRadius=256.000000
|
|
MomentumTransfer=92000.000000
|
|
MyDamageType=Class'UT2341WeaponsReducedv1a.DamType_Rocket'
|
|
ExplosionDecal=Class'XEffects.RocketMark'
|
|
LightType=LT_Steady
|
|
LightEffect=LE_QuadraticNonIncidence
|
|
LightHue=28
|
|
LightBrightness=255.000000
|
|
LightRadius=6.000000
|
|
CullDistance=7500.000000
|
|
bDynamicLight=True
|
|
AmbientSound=Sound'UT2341Weapons_Sounds.RocketLauncher.RocketFly1'
|
|
LifeSpan=6.000000
|
|
Mesh=SkeletalMesh'UT2341Weapons_Anims.UTRocket'
|
|
AmbientGlow=96
|
|
FluidSurfaceShootStrengthMod=10.000000
|
|
SoundVolume=255
|
|
SoundPitch=100
|
|
SoundRadius=16.000000
|
|
bFixedRotationDir=True
|
|
RotationRate=(Roll=50000)
|
|
DesiredRotation=(Roll=30000)
|
|
ForceType=FT_Constant
|
|
ForceRadius=100.000000
|
|
ForceScale=5.000000
|
|
}
|