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

XGame.xBombDelivery


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
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
//=============================================================================
// xBombDelivery.
// For Bombing Run matches.
//=============================================================================
class xBombDelivery extends GameObjective
	placeable;

#exec OBJ LOAD File=WeaponSounds.uax

var(Team) int Team;
var xBombDeliveryHole MyHole;
var int ExplosionCounter,ExplodeNow,LastExplodeNow;
var() float TouchDownDifficulty;

replication
{
    reliable if( Role==ROLE_Authority )
        ExplodeNow;
}

function bool CanDoubleJump(Pawn Other)
{
	return true;
}

function bool CanMakeJump(Pawn Other, Float JumpHeight, Float GroundSpeed, Int Num, Actor Start, bool bForceCheck)
{
	if ( !bForceCheck && (JumpHeight > Other.JumpZ) && (PhysicsVolume.Gravity.Z >= CalculatedGravityZ[Num]) && (NeededJump[Num].Z < 2 * Other.JumpZ) )
		return true;

	return Super.CanMakeJump(Other,JumpHeight,GroundSpeed,Num,Start,bForceCheck);
}

function float GetDifficulty()
{
	return TouchDownDifficulty;
}

simulated function PostBeginPlay()
{
	local NavigationPoint N;
	
	Super.PostBeginPlay();

	if ( Role == ROLE_Authority )
	{
		DefenderTeamIndex = Team;
		NetUpdateTime = Level.TimeSeconds - 1;

		// spawn my scoring hole
		MyHole = Spawn(class'xBombDeliveryHole',self,,Location,Rotation);
	    
		// check if has shootspots
		for ( N=Level.NavigationPointList; N!=None; N=N.NextNavigationPoint )
			if ( (ShootSpot(N) != None) && (ShootSpot(N).TeamNum == Team) )
			{
				bHasShootSpots = true;
				break;
			}
	}		
	SetTeamColors();
}
    
function ScoreEffect(bool touchdown)
{
    ExplodeNow++;
    // spawn some explosions
    PlaySound(sound'WeaponSounds.BExplosion3');
    Spawn(class'NewExplosionA',,,Location+VRand()*Vect(50,50,50));
    ExplosionCounter = 1;    
    SetTimer(0.25,true);
}

simulated function Timer()
{
	PlaySound(sound'WeaponSounds.BExplosion3');
    Spawn(class'NewExplosionA',,,Location+VRand()*Vect(50,50,50));    
    ExplosionCounter++;

    if (ExplosionCounter > 5)
        SetTimer(0.0,false);
}

simulated function SetTeamColors()
{
    if (Team == 0)
    {
        LightHue = 0;
        Skins[1] = Combiner'XGameTextures.superpickups.BombgatePulseRC';
    }
    else
    {
        LightHue = 170;
        Skins[1] = Combiner'XGameTextures.superpickups.BombgatePulseBC';
	}
}

simulated event PostNetReceive()
{
    Super.PostNetReceive();

    if (LastExplodeNow != ExplodeNow)
    {
        LastExplodeNow = ExplodeNow;
        PlaySound(sound'WeaponSounds.BExplosion3');
        Spawn(class'NewExplosionA',,,Location+VRand()*Vect(50,50,50));
        ExplosionCounter = 1;    
        SetTimer(0.25,true);
    }
}

defaultproperties
{
	bDestinationOnly=true
	NetUpdateFrequency=40
	ObjectiveStringSuffix=" Goal"
	TransientSoundVolume=+1.0
	TouchDownDifficulty=+0.5
	bNotBased=true
	RemoteRole=ROLE_SimulatedProxy
	bAlwaysRelevant=true
    bHidden=false
    bUnlit=true
    bPathColliding=true
    bStasis=false
    bStatic=false
	bNoDelete=true
	bWorldGeometry=true
    bCollideActors=true
    bCollideWorld=false
    bBlockActors=true
    bProjTarget=true
    bBlockZeroExtentTraces=true
    bBlockNonZeroExtentTraces=true
    bUseCylinderCollision=false
    CollisionRadius=16.000000
    CollisionHeight=16.000000
    DrawScale=0.80000
    DrawType=DT_StaticMesh
    //StaticMesh=XGame_rc.BombDeliveryMesh
    StaticMesh=StaticMesh'XGame_StaticMeshes.BombGate'
    Skins(0)=Texture'XGameTextures.superpickups.BombGate'
    Skins(1)=Combiner'XGameTextures.superpickups.BombgatePulseRC'
    Style=STY_Normal
	bDynamicLight=True	
    LightType=LT_SubtlePulse
	LightEffect=LE_QuadraticNonIncidence
	LightRadius=6
    LightBrightness=255	
    LightHue=255
    LightSaturation=55    
    SoundRadius=255
    SoundVolume=255
    bNetNotify=true
    bBlockKarma=true
}

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.885 - Created with UnCodeX