class SLFire extends RedeemerFire;
//SLProjectile
function Projectile SpawnProjectile(Vector Start, Rotator Dir)
{
local Projectile p;
local vector newloc;
//if (ShouldJumpOff())
// return none;
p = Super.SpawnProjectile(Start,Dir);
if ( p == None )
p = Super.SpawnProjectile(Instigator.Location,Dir);
if ( p == None )
{
Spawn(class'SmallRedeemerExplosion');
HurtRadius(500, 400, class'DamTypeRedeemer', 100000, Instigator.Location);
return none;
}
else
{
BoomStick(Weapon).SLProjectile=SLProjectile(p);
SLProjectile(p).ShootingInstigator=SLProjectile(p).instigator;
instigator.SetPhysics(PHYS_Trailer);
p.Attach( instigator);
instigator.SetBase(p);
newloc=vect(0.00,0.00,0.00);
newloc.Z += 15;
instigator.SetRelativeLocation(newloc);
instigator.Velocity=SLProjectile(p).Velocity;
instigator.Velocity=SLProjectile(p).Acceleration;
}
bIsFiring = false;
StopFiring();
return p;
}
simulated function bool ShouldJumpOff()
{
if (BoomStick(Weapon).SLProjectile!=None
// && BoomStick(Weapon).SLProjectile.bFlyingSL
)
{
BoomStick(Weapon).SLProjectile.bFlyingSL=false;
// instigator.SetPhysics(PHYS_Falling);
BoomStick(Weapon).SLProjectile.ShootingInstigator=None;
//BoomStick(Weapon).SLProjectile.Detach( instigator );
BoomStick(Weapon).SLProjectile=none;
Weapon.Owner.SetBase(none);
// PlayerController(Pawn(Weapon.Owner).Controller).Gotostate('PlayerWalking');
Weapon.Owner.SetPhysics(PHYS_Falling);
Pawn(Weapon.Owner).JumpOffPawn();
return true;
}
return false;
}
simulated function bool AllowFire()
{
if (BoomStick(Weapon).SLProjectile!=None)
return true;
return Super.AllowFire();
}
event ModeDoFire()
{
if (BoomStick(Weapon).SLProjectile!=None)
if (ShouldJumpOff())
{
bIsFiring = false;
Weapon.PutDown();
return;
}
Weapon.SetOverlayMaterial(FinalBlend'XEffectMat.InvisOverlayFB', 60.0, true);
Super.ModeDoFire();
}
defaultproperties
{
bWaitForRelease=True
AmmoClass=Class'wgsstrangelove.SLAmmo'
ProjectileClass=Class'wgsstrangelove.SLProjectile'
}