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

UT2k4AssaultFull.FM_SpaceFighter_InstantHitLaser


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
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
//=============================================================================
// FM_SpaceFighter_InstantHitLaser
//=============================================================================
// Created by Laurent Delayen
// © 2003, Epic Games, Inc.  All Rights Reserved
//=============================================================================

class FM_SpaceFighter_InstantHitLaser extends InstantFire;

var bool                bSwitch;
var name                FireAnimLeft, FireAnimRight;
var Sound               FireSounds[2];


event ModeDoFire()
{
    bSwitch = ( (WeaponAttachment(Weapon.ThirdPersonActor).FlashCount % 2) == 1 );
    super.ModeDoFire();
}

function DoFireEffect()
{
    local Vector    StartTrace, HL, HN;
    local Rotator   R;

    if ( Instigator == None || !Instigator.IsA('ASVehicle') )
    {
        super.DoFireEffect();
        return;
    }

    if ( ASVehicle_SpaceFighter_Skaarj(Instigator) != None )    // hack for Skaarj SF damagetype
        DamageType = class'DamTypeSpaceFighterLaser_Skaarj';

    Instigator.MakeNoise(1.0);

    StartTrace  = ASVehicle(Instigator).GetFireStart();
    ASVehicle(Instigator).CalcWeaponFire( HL, HN );

    R = Rotator( Normal(HL-StartTrace) );

    DoTrace(StartTrace, R);
}

function PlayFiring()
{
    if ( Weapon.Mesh != None )
    {
        if ( bSwitch && Weapon.HasAnim(FireAnimRight) )
            FireAnim = FireAnimRight;
        else if ( !bSwitch && Weapon.HasAnim(FireAnimLeft) )
            FireAnim = FireAnimLeft;
    }

    UpdateFireSound();

    super.PlayFiring();
}

simulated function UpdateFireSound()
{
    if ( Instigator.IsA('ASTurret') || Instigator.IsA('ASVehicle_SpaceFighter_Skaarj') )
        FireSound = FireSounds[0];
    else
        FireSound = FireSounds[1];
}

simulated function bool AllowFire()
{
    return true;
}

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

defaultproperties
{
     FireAnimLeft="FireL"
     FireAnimRight="FireR"
     FireSounds(0)=Sound'ONSVehicleSounds-S.LaserSounds.Laser02'
     FireSounds(1)=Sound'AssaultSounds.HumanShip.HnShipFire01'
     DamageType=Class'UT2k4AssaultFull.DamTypeSpaceFighterLaser'
     DamageMin=30
     DamageMax=40
     TraceRange=65536.000000
     FireLoopAnim=
     FireEndAnim=
     FireAnimRate=0.450000
     TweenTime=0.000000
     FireSound=SoundGroup'WeaponSounds.PulseRifle.PulseRifleFire'
     FireForce="TranslocatorFire"
     FireRate=0.200000
     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.200000
     aimerror=800.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 23/10/2006 20:40:04.000 - Creation time: Wed 7/2/2007 19:16:39.390 - Created with UnCodeX