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

XGame.xCTFGame


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
//=============================================================================
// xCTFGame.
//=============================================================================
class xCTFGame extends CTFGame
    config;

#exec OBJ LOAD FILE=GameSounds.uax
#exec OBJ LOAD File=XGameShadersB.utx

static function PrecacheGameTextures(LevelInfo myLevel)
{
	class'xTeamGame'.static.PrecacheGameTextures(myLevel);
}

static function PrecacheGameStaticMeshes(LevelInfo myLevel)
{
	class'xDeathMatch'.static.PrecacheGameStaticMeshes(myLevel);
}


function actor FindSpecGoalFor(PlayerReplicationInfo PRI, int TeamIndex)
{
	local XPlayer PC;
    local Controller C;
    local CTFFlag Flags[2],F;

    PC = XPlayer(PRI.Owner);
    if (PC==None)
    	return none;

    // Look for a Player holding the flag


    for (C=Level.ControllerList;C!=None;C=C.NextController)
    {
    	if ( (C.PlayerReplicationInfo != None) && (C.PlayerReplicationInfo.HasFlag!=None)
    		&& (PC.ViewTarget == None || PC.ViewTarget != C.Pawn) )
        	return C.Pawn;
    }

	foreach AllActors(class'CTFFlag',f)
    	Flags[f.TeamNum]=f;

    if ( vsize(PC.Location - Flags[0].Location) < vsize(PC.Location - Flags[1].Location) )
    	return Flags[1];
    else
    	return Flags[0];

    return none;

}

event SetGrammar()
{
	LoadSRGrammar("CTF");
}

defaultproperties
{
    MapListType="XInterface.MapListCaptureTheFlag"
    DeathMessageClass=class'XGame.xDeathMessage'
    HUDType="XInterface.HudCCaptureTheFlag"
	DefaultEnemyRosterClass="xGame.xTeamRoster"

    ScreenShotName="UT2004Thumbnails.CTFShots"
    DecoTextName="XGame.CTFGame"

    GameName="Capture the Flag"
    MapPrefix="CTF"
    Acronym="CTF"
	OtherMesgGroup="CTFGame"
    Description="Your team must score flag captures by taking the enemy flag from the enemy base and returning it to their own flag.  If the flag carrier is killed, the flag drops to the ground for anyone to pick up.  If your team's flag is taken, it must be returned (by touching it after it is dropped) before your team can score a flag capture."
}

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