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

UT2k4Assault.ObjectivePointingArrow


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

class ObjectivePointingArrow extends Actor;

var vector DrawOffset;

var Material    PulseTeamSkin[2], TeamSkin[2];

simulated function SetTeamSkin( byte Team, bool bPulse )
{   
    if ( bPulse )
        Skins[0] = PulseTeamSkin[Team];
    else
        Skins[0] = TeamSkin[Team];
}

simulated function SetYellowColor( bool bPulse )
{
    if ( bPulse )
        Skins[0] = Shader'AS_FX_TX.Skins.OBJ_ArrowPulse_Yellow_S';
    else
        Skins[0] = Shader'AS_FX_TX.Skins.OBJ_ArrowNormal_Yellow_S';
}

simulated function Render( Canvas C, PlayerController PC, Actor TrackedActor )
{
    local rotator   ArrowRot, CamRot;
    local vector    ArrowLoc, CamLoc, X, Y, Z;
    local Actor     A;
    local float     ScreenRatio;

    PC.PlayerCalcView(A, CamLoc, CamRot );

    // Arrow Location
    ScreenRatio = 1.333333333333 / (C.ClipX / C.ClipY);

    PC.GetAxes( CamRot, X, Y, Z );
    ArrowLoc = CamLoc + X * DrawOffset.X + Y * DrawOffset.Y + Z * ScreenRatio * DrawOffset.Z;
    SetLocation( ArrowLoc );

    // Arrow Rotation
    //ArrowRot		= Rotator( ArrowLoc - PC.GetPathTo(CurrentObjective).Location );
    ArrowRot        = Rotator( ArrowLoc - TrackedActor.Location );
    ArrowRot.Pitch += 32768;
    SetRotation( ArrowRot );

    // Draw Arrow
    //C.DrawActor(None, false, true);	// Clear Z-Buffer first!
    C.DrawActor(Self, false, false, 90.0);
}

defaultproperties
{
     DrawOffset=(X=16.000000,Z=9.500000)
     PulseTeamSkin(0)=Shader'AS_FX_TX.Skins.ObjectiveArrow_Red_S'
     PulseTeamSkin(1)=Shader'AS_FX_TX.Skins.ObjectiveArrow_Blue_S'
     TeamSkin(0)=Shader'AS_FX_TX.Skins.OBJ_ArrowNormal_Red_S'
     TeamSkin(1)=Shader'AS_FX_TX.Skins.OBJ_ArrowNormal_Blue_S'
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'AS_Weapons_SM.fX.ObjectiveArrow'
     bLightingVisibility=False
     bHidden=True
     bOnlyOwnerSee=True
     bAcceptsProjectors=False
     RemoteRole=ROLE_None
     DrawScale=0.015000
     DrawScale3D=(Y=4.000000)
     bUnlit=True
     bBlockZeroExtentTraces=False
     bBlockNonZeroExtentTraces=False
}

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:45.531 - Created with UnCodeX