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

UT2k4AssaultFull.WA_LinkTurret


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
//=============================================================================
// FX_LinkTurret_BeamEffect
//=============================================================================
// Created by Laurent Delayen
// © 2003, Epic Games, Inc.  All Rights Reserved
//=============================================================================

class WA_LinkTurret extends LinkAttachment;

var ELinkColor	OldLinkColor;
var int			OldLinks;

simulated function UpdateLinkColor()
{
	super.UpdateLinkColor();
	if ( Instigator != None )
		ASTurret_LinkTurret(Instigator).UpdateLinkColor( LinkColor );
}


simulated function PostNetReceive()
{
	super.PostNetReceive();
	if ( LinkColor != OldLinkColor && Instigator != None)
	{
		ASTurret_LinkTurret(Instigator).UpdateLinkColor( LinkColor );
		OldLinkColor = LinkColor;
	}
	else if ( Links != OldLinks )
	{
		if ( Links > 0 )
			SetLinkColor( LC_Gold );
		else
			SetLinkColor( LC_Green );
		OldLinks = Links;
	}
}

simulated event ThirdPersonEffects()
{
    local Rotator	R;
	local vector	Start;

	if ( Instigator == None  )
		return;

    if ( Level.NetMode != NM_DedicatedServer && FlashCount > 0 )
	{
        if ( FiringMode == 0 )
        {
            if ( MuzFlash == None )
            {
				Start = ASVehicle(Instigator).GetFireStart();

                MuzFlash = Spawn(class'LinkMuzFlashProj3rd',,, Start, Instigator.Rotation );

				if ( MuzFlash != None )
				{
					MuzFlash.bHardAttach = true;
					MuzFlash.SetBase( Instigator );
				}
            }

            if ( MuzFlash != None )
            {
                MuzFlash.mSizeRange[0] = MuzFlash.default.mSizeRange[0] * (class'LinkFire'.default.LinkScale[Clamp(Links,0,5)]+1); // (1.0 + 0.3*float(Links));
                MuzFlash.mSizeRange[1] = MuzFlash.mSizeRange[0];

				if ( Links > 0 )
					SetLinkColor( LC_Gold );
				else
					SetLinkColor( LC_Green );
				UpdateLinkColor();

				MuzFlash.Trigger(Self, None);
                R.Roll = Rand(65536);
                MuzFlash.SetRelativeRotation( R );
            }

			// have pawn play firing anim
			Instigator.PlayFiring(1.0, '0');
        }
    }

    super(xWeaponAttachment).ThirdPersonEffects();
}

defaultproperties
{
	bReplicateLinkColor=true
	bNetNotify=true
    Mesh=None
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:36:14.000 - Creation time: Do 14.8.2014 09:58:55.183 - Created with UnCodeX