NukeRifles
NukeRifleFire
class NukeRifleFire extends ShockBeamFire;
var() int Damage;
var() float MomentumTransfer;
var() float DamageRadius;
function DoTrace(Vector Start, Rotator Dir)
{
local Vector X;
X = vector(Dir);
TracePart(Start,Start+X*TraceRange,X,Dir,Instigator);
}
function TracePart(Vector Start, Vector End, Vector X, Rotator Dir, Pawn Ignored)
{
local Vector HitLocation, HitNormal;
local Actor Other;
local NukeRifleProjectile Mushroom_cloud;
Other = Ignored.Trace(HitLocation, HitNormal, End, Start, true);
if ( (Other != None) && (Other != Ignored) )
{
HitNormal = Vect(0,0,0);
}
else
{
HitLocation = End;
HitNormal = Vect(0,0,0);
}
SpawnBeamEffect(Start, Dir, HitLocation, HitNormal, 0);
if( Instigator.bDeleteMe != true )
Mushroom_cloud = Spawn(class'my_mod2.NukeRifleProjectile',Instigator,, HitLocation - (100*Normal(HitLocation - Start)) , Dir);
}
function SpawnBeamEffect(Vector Start, Rotator Dir, Vector HitLocation, Vector HitNormal, int ReflectNum)
{
local ShockBeamEffect Beam;
if ( (Instigator.PlayerReplicationInfo.Team != None) && (Instigator.PlayerReplicationInfo.Team.TeamIndex == 1) )
Beam = Spawn(class'BlueSuperShockBeam',,, Start, Dir);
else
Beam = Spawn(BeamEffectClass,,, Start, Dir);
if (ReflectNum != 0) Beam.Instigator = None;
Beam.AimAt(HitLocation, HitNormal);
}
defaultproperties
{
AmmoClass=class'SuperShockAmmo'
AmmoPerFire=0
DamageType=class'my_mod2.DamTypeNukeRifle'
DamageMin=500
DamageMax=500
Momentum=70000
FireSound=Sound'WeaponSounds.instagib_rifleshot'
FireForce="ShockRifleFire"
bReflective=true
FireRate=1.5
BeamEffectClass=class'SuperShockBeamEffect'
bModeExclusive=true
AimError=700
}