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

XGame.xTeamBanner


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
//=============================================================================
// xTeamBanner.
//=============================================================================
class xTeamBanner extends Decoration;

// todo: the white texture used for dom2 neutral state needs to be a shader so it can be 2-sided!!!

var() byte Team;
var GameReplicationInfo GRI;

simulated function PostBeginPlay()
{
    LoopAnim('AnimFlag');
    SetAnimFrame(FRand());

    Super.PostBeginPlay();
}

simulated function UpdateForTeam()
{
    if (Team == 0)
        Skins[0] = Shader'XGameShaders.RedBannerShader';
    else if ( Team > 1 )
		Skins[0] = Default.Skins[0]; //Shader'XGameShaders.TeamBannerShadder';
	else
        Skins[0] = Shader'XGameShaders.BlueBannerShader';

	if ( (GRI != None) && (Team < 2) && (GRI.TeamSymbols[Team] != None) )
		TexScaler(Combiner(Shader(Skins[0]).Diffuse).Material2).Material = GRI.TeamSymbols[Team];
}

simulated function SetGRI(GameReplicationInfo NewGRI)
{
	GRI = NewGRI;
	UpdateForTeam();
}

simulated function PostNetBeginPlay()
{
	Super.PostNetBeginPlay();
    if ( Level.Game != None )
		SetGRI(Level.Game.GameReplicationInfo);
}

simulated function Trigger( actor Other, pawn EventInstigator )
{
    local DominationPoint DPoint;

	DPoint = DominationPoint(Other);
    if ( DPoint != None )
    {
        // is the point disabled?
        if (!DPoint.bControllable)
			Team = 254;
        else if (DPoint.ControllingTeam == None)
 			Team = 255;
        else
			Team = DPoint.ControllingTeam.TeamIndex;
        UpdateForTeam();
    }
}

defaultproperties
{
	RemoteRole=Role_None
	bNoDelete=true
    bHidden=false
    bUnlit=true
    bStasis=false
    bStatic=false
    bCollideActors=true
    bCollideWorld=true
    bNetNotify=true
    DrawScale=1.70000
    DrawType=DT_Mesh
    Style=STY_Normal
    Mesh=Mesh'TeamBannerMesh'
    Skins(0)=Shader'XGameShaders.TeamBannerShader'
    CollisionRadius=48.000000
    CollisionHeight=90.000000
    Mass=100.000000
    Tag='DominationChange'
}

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