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

UT2k4Assault.FM_Sentinel_Fire


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
00077
00078
00079
//=============================================================================
// FM_Sentinel_Fire
//=============================================================================

class FM_Sentinel_Fire extends ProjectileFire;

var class<Projectile>   TeamProjectileClasses[2];


function DoFireEffect()
{
    local Vector    ProjOffset;
    local Vector    Start, X,Y,Z, HL, HN;

    if ( Instigator.IsA('ASVehicle') )
        ProjOffset = ASVehicle(Instigator).VehicleProjSpawnOffset;

    ProjSpawnOffset = ProjOffset;

    Instigator.MakeNoise(1.0);
    Instigator.GetAxes(Instigator.Rotation, X, Y, Z);

    Start = MyGetFireStart(X, Y, Z);

    ASVehicle(Instigator).CalcWeaponFire( HL, HN );
    SpawnProjectile(Start, Rotator(HL - Start));
}

simulated function vector MyGetFireStart(vector X, vector Y, vector Z)
{
    return Instigator.Location + X*ProjSpawnOffset.X + Y*ProjSpawnOffset.Y + Z*ProjSpawnOffset.Z;
}


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

    p = Weapon.Spawn(TeamProjectileClasses[Instigator.GetTeamNum()], Instigator, , Start, Dir);
    if ( p == None )
        return None;

    p.Damage *= DamageAtten;
    return p;
}


simulated function bool AllowFire()
{
    return true;
}

//=============================================================================
// defaultproperties
//=============================================================================

defaultproperties
{
     TeamProjectileClasses(0)=Class'UT2k4Assault.PROJ_Sentinel_Laser_Red'
     TeamProjectileClasses(1)=Class'UT2k4Assault.PROJ_Sentinel_Laser'
     ProjSpawnOffset=(X=200.000000,Y=14.000000,Z=-14.000000)
     FireLoopAnim=
     FireEndAnim=
     FireAnimRate=0.450000
     TweenTime=0.000000
     FireSound=Sound'AssaultSounds.HumanShip.HnShipFire01'
     FireForce="TranslocatorFire"
     FireRate=0.250000
     AmmoClass=Class'UT2k4Assault.Ammo_Dummy'
     ShakeRotMag=(X=40.000000)
     ShakeRotRate=(X=2000.000000)
     ShakeRotTime=2.000000
     ShakeOffsetMag=(Y=1.000000)
     ShakeOffsetRate=(Y=-2000.000000)
     ShakeOffsetTime=4.000000
     BotRefireRate=0.990000
     WarnTargetPct=0.400000
}

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