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

XGame.xBombSpawn


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
//=============================================================================
// xBombSpawn.
//=============================================================================
class xBombSpawn extends GameObjective
    placeable;

var() Sound TakenSound;
var xBombFlag myFlag;
var class<xBombFlag> FlagType;

#exec OBJ LOAD FILE=XGameShaders.utx

function BeginPlay()
{
    Super.BeginPlay(); 
    if ( !Level.Game.IsA('xBombingRun') )
        return;
        
    myFlag = Spawn(FlagType, self);

    if (myFlag==None)
    {
        warn(Self$" could not spawn flag of type '"$FlagType$"' at "$location);
        return;
    }
    else
        myFlag.HomeBase = self;
    
    Spawn(class'XGame.xBombBase',self,,Location-vect(0,0,60),Rotation);
}

function bool BotNearObjective(Bot B)
{

    if  ( (myFlag == None) || (B==None) )
        return false;

    if ( (MyBaseVolume != None) && myFlag.bHome && B.Pawn.IsInVolume(MyBaseVolume) )
        return true;
    
    return ( (VSize(myFlag.Position().Location - B.Pawn.Location) < 2000) && B.LineOfSightTo(myFlag.Position()) );
}

function bool BetterObjectiveThan(GameObjective Best, byte DesiredTeamNum, byte RequesterTeamNum)
{
    if ( !myFlag.bHome || (RequesterTeamNum == DesiredTeamNum) )
        return false;
    return true;
}

defaultproperties
{
     TakenSound=Sound'GameSounds.CTFAlarm'
     FlagType=Class'XGame.xBombFlag'
     DefenderTeamIndex=255
     ObjectiveName="Bomb Spawn"
     bNotBased=True
     LightType=LT_SubtlePulse
     LightEffect=LE_QuadraticNonIncidence
     LightHue=37
     LightSaturation=255
     LightBrightness=128.000000
     LightRadius=6.000000
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'XGame_rc.BallMesh'
     bAlwaysRelevant=True
     NetUpdateFrequency=8.000000
     DrawScale=3.000000
     bUnlit=True
     CollisionRadius=60.000000
     CollisionHeight=60.000000
     bCollideActors=True
}

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