Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

XWeapons.TransFire


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
class TransFire extends ProjectileFire;

var() Sound TransFireSound;
var() Sound RecallFireSound;
var() String TransFireForce;
var() String RecallFireForce;

simulated function PlayFiring()
{
    if (!TransLauncher(Weapon).bBeaconDeployed)
    {
        Weapon.PlayAnim(FireAnim, FireAnimRate, TweenTime);
        ClientPlayForceFeedback( TransFireForce );  // jdf
    }
}

function Rotator AdjustAim(Vector Start, float InAimError)
{
    return Instigator.Controller.Rotation;
}

simulated function bool AllowFire()
{
    return ( TransLauncher(Weapon).AmmoChargeF >= 1.0 );
}

function projectile SpawnProjectile(Vector Start, Rotator Dir)
{
    local TransBeacon TransBeacon;

    if (TransLauncher(Weapon).TransBeacon == None)
    {
        if ( (Instigator == None) || (Instigator.PlayerReplicationInfo == None) || (Instigator.PlayerReplicationInfo.Team == None) )
            TransBeacon = Weapon.Spawn(class'XWeapons.TransBeacon',,, Start, Dir);
        else if ( Instigator.PlayerReplicationInfo.Team.TeamIndex == 0 )
            TransBeacon = Weapon.Spawn(class'XWeapons.RedBeacon',,, Start, Dir);
        else
            TransBeacon = Weapon.Spawn(class'XWeapons.BlueBeacon',,, Start, Dir);
        TransLauncher(Weapon).TransBeacon = TransBeacon;
        Weapon.PlaySound(TransFireSound,SLOT_Interact,,,,,false);
    }
    else
    {
        TransLauncher(Weapon).ViewPlayer();
        if ( TransLauncher(Weapon).TransBeacon.Disrupted() )
        {
            if( (Instigator != None) && (PlayerController(Instigator.Controller) != None) )
                PlayerController(Instigator.Controller).ClientPlaySound(Sound'WeaponSounds.BSeekLost1');
        }
        else
        {
            TransLauncher(Weapon).TransBeacon.Destroy();
            TransLauncher(Weapon).TransBeacon = None;
            Weapon.PlaySound(RecallFireSound,SLOT_Interact,,,,,false);
        }
    }
    return TransBeacon;
}

defaultproperties
{
     TransFireSound=SoundGroup'WeaponSounds.Translocator.TranslocatorFire'
     RecallFireSound=SoundGroup'WeaponSounds.Translocator.TranslocatorModuleRegeneration'
     TransFireForce="TranslocatorFire"
     RecallFireForce="TranslocatorModuleRegeneration"
     ProjSpawnOffset=(X=25.000000,Y=8.000000)
     bLeadTarget=False
     bWaitForRelease=True
     bModeExclusive=False
     FireAnimRate=1.500000
     FireRate=0.250000
     AmmoPerFire=1
     ProjectileClass=Class'XWeapons.TransBeacon'
     BotRefireRate=0.300000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Tue 24/10/2006 17:08:00.000 - Creation time: Wed 7/2/2007 19:16:54.875 - Created with UnCodeX