Files
UT2k4-Mod-UT2341/Sources/Classes/UT2341RedeemerGuidedFire.uc
2022-11-28 01:19:02 +00:00

44 lines
1.2 KiB
Ucode

class UT2341RedeemerGuidedFire extends UT2341RedeemerFire;
function Projectile SpawnProjectile(Vector Start, Rotator Dir)
{
local RedeemerWarhead Warhead;
local PlayerController Possessor;
Warhead = Weapon.Spawn(class'UT2341RedeemerWarhead', Instigator,, Start, Dir);
if (Warhead == None)
Warhead = Weapon.Spawn(class'UT2341RedeemerWarhead', Instigator,, Instigator.Location, Dir);
if (Warhead != None)
{
Warhead.OldPawn = Instigator;
Warhead.PlaySound(FireSound);
Possessor = PlayerController(Instigator.Controller);
Possessor.bAltFire = 0;
if ( Possessor != None )
{
if ( Instigator.InCurrentCombo() )
Possessor.Adrenaline = 0;
Possessor.UnPossess();
Instigator.SetOwner(Possessor);
Instigator.PlayerReplicationInfo = Possessor.PlayerReplicationInfo;
Possessor.Possess(Warhead);
}
Warhead.Velocity = Warhead.AirSpeed * Vector(Warhead.Rotation);
Warhead.Acceleration = Warhead.Velocity;
WarHead.MyTeam = Possessor.PlayerReplicationInfo.Team;
}
else
{
Weapon.Spawn(class'SmallRedeemerExplosion');
Weapon.HurtRadius(500, 400, class'DamTypeRedeemer', 100000, Instigator.Location);
}
bIsFiring = false;
StopFiring();
return None;
}
defaultproperties
{
}