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

U2.U2BubbleA


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
//=============================================================================
// U2BubbleA.uc
//=============================================================================
class U2BubbleA extends Effects;

#exec Texture Import File=models\bubble1.tga  Name=S_bubble1 Mips=Off Masked=1
#exec Texture Import File=models\bubble2.tga  Name=S_bubble2 Mips=Off Masked=1
#exec Texture Import File=models\bubble3.tga  Name=S_bubble3 Mips=Off Masked=1
    
var float WaterLineHeight;

var() Sound 	EffectSound1;
var() Sound 	EffectSound2;

//-----------------------------------------------------------------------------

simulated event PhysicsVolumeChange( PhysicsVolume NewVolume )
{
	if( !NewVolume.PhysicsVolume.bWaterVolume ) 
	{
		Destroy();
		PlaySound (EffectSound1);
	}	
}

//-----------------------------------------------------------------------------
// Temporarily disabled- performance hit too severe.

simulated event Tick( float DeltaTime )
{
	if( Location.Z > ( WaterLineHeight - 12 ) )
	{
		Destroy();
	}
	SetRotation( rotator( VRand() ) );
	Velocity = ( 32 * vector ( Rotation ) ) + vect( 0, 0, 32 );

}

//-----------------------------------------------------------------------------

simulated event BeginPlay()
{
	Super.BeginPlay();
	if ( Level.NetMode != NM_DedicatedServer )
	{
		PlaySound( EffectSound2 ); //Spawned Sound
		LifeSpan = 3 + 4 * FRand();
		Buoyancy = Mass + FRand()+0.1;
		if (FRand()<0.3) Texture = texture'S_Bubble2';
		else if (FRand()<0.3) Texture = texture'S_Bubble3';
		SetDrawScale( DrawScale + FRand()*DrawScale/2 );
	}
}

//-----------------------------------------------------------------------------
/* Fix ARL: FindWaterSurface no longer exists.  Use zone change event?  Replace with TRACE_Zone in SingleLineCheck()?
simulated event PostBeginPlay()
{
	local vector SurfaceLocation;

	FindWaterSurface( SurfaceLocation, Location, Location + ( 512 * vect( 0, 0, 1 ) ) );

	if( SurfaceLocation != vect( 0, 0, 0 ) )
	{
		WaterLineHeight = SurfaceLocation.Z;
	}
	else
	{
		Disable( 'Tick' );
	}
}
*/

//-----------------------------------------------------------------------------

defaultproperties
{
	Physics=PHYS_Falling
	bNetOptional=true
	RemoteRole=ROLE_SimulatedProxy
	LifeSpan=2.000000
	Texture=Texture'U2.S_bubble1'
	Style=STY_Translucent
	Mass=3.000000
	Buoyancy=3.750000
     UseReticleOnEvents(0)="UseReticleText"
     UseReticleOnEvents(1)="UseReticleCorners"
     UseReticleOnEvents(2)="UseReticleTopBars"
     ProximityReticleOnEvents(0)="ProximityReticleCorners"
     ProximityReticleOnEvents(1)="ProximityReticleTopBars"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: sk 3-1-2016 10:38:42.000 - Creation time: sk 3-1-2016 10:48:42.511 - Created with UnCodeX