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

Engine.LevelInfo


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
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
//=============================================================================
// LevelInfo contains information about the current level. There should
// be one per level and it should be actor 0. UnrealEd creates each level's
// LevelInfo automatically so you should never have to place one
// manually.
//
// The ZoneInfo properties in the LevelInfo are used to define
// the properties of all zones which don't themselves have ZoneInfo.
//=============================================================================
class LevelInfo extends ZoneInfo
			Native
				NativeReplication;

// Textures.
#exec Texture Import File=Textures\DefaultTexture.pcx
#exec Texture Import File=Textures\WhiteTexture.pcx
#exec Texture Import File=Textures\S_Lightgrey.pcx  Name=S_Lightgrey Mips=Off Flags=2

//-----------------------------------------------------------------------------
// Level time.

// Time passage.
var() float TimeDilation;          // Normally 1 - scales real time passage.

// Current time.
var float			TimeSeconds;   // Time in seconds since level began play.
var transient int   Year;          // Year.
var transient int   Month;         // Month.
var transient int   Day;           // Day of month.
var transient int   DayOfWeek;     // Day of week.
var transient int   Hour;          // Hour.
var transient int   Minute;        // Minute.
var transient int   Second;        // Second.
var transient int   Millisecond;   // Millisecond.

//-----------------------------------------------------------------------------
// Text info about level.

var() localized string Title;
var()           string Author;		    // Who built it.
var() localized string IdealPlayerCount;// Ideal number of players for this level. I.E.: 6-8
var() int	RecommendedEnemies;			// number of enemy bots recommended (used by rated games)
var() int	RecommendedTeammates;		// number of friendly bots recommended (used by rated games)
var() localized string LevelEnterText;  // Message to tell players when they enter.
var()           string LocalizedPkg;    // Package to look in for localizations.
var             string Pauser;          // If paused, name of person pausing the game.
var levelsummary Summary;
var           string VisibleGroups;		    // List of the group names which were checked when the level was last saved


//-----------------------------------------------------------------------------
// Flags affecting the level.

var() bool           bLonePlayer;     // No multiplayer coordination, i.e. for entranceways.
var bool             bBegunPlay;      // Whether gameplay has begun.
var bool             bPlayersOnly;    // Only update players.
var bool             bHighDetailMode; // Client high-detail mode.
var bool			 bDropDetail;	  // frame rate is below DesiredFrameRate, so drop high detail actors
var bool			 bAggressiveLOD;  // frame rate is well below DesiredFrameRate, so make LOD more aggressive
var bool             bStartup;        // Starting gameplay.
var() bool			 bHumansOnly;	  // Only allow "human" player pawns in this level
var bool			 bNoCheating;
var bool			 bAllowFOV;
var() bool			 bSupportsRealCrouching; // Support crouching f.e. through tunnels with half player height
var const int		 EdBuildOpt;	  // Editor only, last used build options!

//-----------------------------------------------------------------------------
// Audio properties.

var(Audio) music  Song;          // Default song for level.
var(Audio) byte   SongSection;   // Default song order for level.
var(Audio) byte   CdTrack;       // Default CD track for level.
var(Audio) float  PlayerDoppler; // Player doppler shift, 0=none, 1=full.
var music		backup_Song;
var byte		backup_SongSection;

//-----------------------------------------------------------------------------
// Miscellaneous information.

var private PlayerPawn LocalPlayer;

var() float Brightness;
var() texture Screenshot;
var texture DefaultTexture;
var texture WhiteTexture;
var Texture TemplateLightTex; // Editor light preview icon.
var int HubStackLevel;
var transient enum ELevelAction
{
	LEVACT_None,
	LEVACT_Loading,
	LEVACT_Saving,
	LEVACT_Connecting,
	LEVACT_Precaching
} LevelAction;

//-----------------------------------------------------------------------------
// Networking.

var enum ENetMode
{
	NM_Standalone,        // Standalone game.
	NM_DedicatedServer,   // Dedicated server, no local client.
	NM_ListenServer,      // Listen server.
	NM_Client             // Client only, no local server.
} NetMode;
var string ComputerName;  // Machine's name according to the OS.
var string EngineVersion; // Engine version.
var string EngineSubVersion; // Engine SubVersion.
var string MinNetVersion; // Min engine version that is net compatible.

//-----------------------------------------------------------------------------
// Gameplay rules

var() class<gameinfo> DefaultGameType;
var GameInfo Game;

//-----------------------------------------------------------------------------
// Navigation point and Pawn lists (chained using nextNavigationPoint and nextPawn).

var NavigationPoint NavigationPointList;
var const Pawn PawnList;

//-----------------------------------------------------------------------------
// Server related.

var string NextURL;
var bool bNextItems;
var float NextSwitchCountdown;

//-----------------------------------------------------------------------------
// Actor Performance Management

var int AIProfile[8]; // TEMP statistics
var float AvgAITime;	//moving average of Actor time

//-----------------------------------------------------------------------------
// Physics control

var() bool bCheckWalkSurfaces; // enable texture-specific physics code for Pawns.

//-----------------------------------------------------------------------------
// 227 variables:
var SpawnNotify SpawnNotify; // Spawn notification list

var() class<FootStepManager> FootprintManager;

// Used by "ObjectPool" functions
var transient array<Object> ObjList;

/* State of a connection.
enum EConState
{
	USOC_Invalid = 0  Connection is invalid, possibly uninitialized.
	USOC_Closed = 1  Connection permanently closed.
	USOC_Pending = 2  Connection is awaiting connection.
	USOC_Open = 3  Connection is open.
}; */

var DynamicZoneInfo DynamicZonesList; // Defines a list of map dynamic zones.
var PlayerPawn ReplicationTarget; 

// Kick out a net connection from the server.
// Returns True if it successfully kicked the client.
native(666) final function bool KickConnection( NetConnection Other, optional string Reason /*="Kicked"*/ );

//-----------------------------------------------------------------------------
// Functions.

//
// Return the URL of this level on the local machine.
//
native function string GetLocalURL();

//
// Return the URL of this level, which may possibly
// exist on a remote machine.
//
native function string GetAddressURL();

//
// Jump the server to a new level.
//
event ServerTravel( string URL, bool bItems )
{
	local GameRules G;

	if ( Len(NextURL)==0 )
	{
		if ( Game!=None && Game.GameRules!=None )
		{
			for ( G=Game.GameRules; G!=None; G=G.NextRules )
				if ( G.bHandleMapEvents && !G.AllowServerTravel(URL,bItems) )
					return;
		}
		bNextItems          = bItems;
		NextURL             = URL;
		if ( Game!=None )
			Game.ProcessServerTravel( URL, bItems );
		else NextSwitchCountdown = 0;
	}
}

//-----------------------------------------------------------------------------
// New U227 functions.
/* Very Fast:
Return the connection state of given connection (look at "EConState" above for results information). */
static native(1703) final function byte GetConState( NetConnection Other );

/* Very fast:
Return the dotted IP-address aswell as port of given connection */
static native(1704) final function string GetConIP( NetConnection Other, out int Port );

/* Very fast:
Return the options connecting client has desired (Index?Name=Blabla?Class=Blabla etc..) */
static native(1705) final function string GetConOpts( NetConnection Other );

/* Very fast:
Return True if current game has some downloaders */
native(1706) final function bool HasDownloaders();

/* Very fast:
Iterate through all connected clients on the server */
native(1707) final iterator function AllConnections( out NetConnection Connect );

/* Very fast:
Iterate through all downloaders in the current game and return their progress */
native(1708) final iterator function AllDownloaders( optional out NetConnection Connect, optional out string File, optional out int Sent, optional out int TotalSz );

/* Very fast:
Return the point region (zone, iLeaf..) of a desired location */
native(1709) final function PointRegion GetLocZone( vector Pos );

/* Very fast:
Find a free object from the list, will return None if not found (Read more: http://wiki.beyondunreal.com/Legacy:Object_Pool). */
native(1710) final function Object AllocateObj( Class<Object> ObjClass );

/* Very fast:
Free an Object back into object list (after its been used). */
native(1711) final function FreeObject( Object Obj );

//-----------------------------------------------------------------------------
// Network replication.

replication
{
	reliable if ( Role==ROLE_Authority )
		Pauser, TimeDilation, bNoCheating, bAllowFOV;
}

function BeginPlay()
{
	// Make a backup of these for resetting.
	backup_Song = Song;
	backup_SongSection = SongSection;
}
// Reset the level
function Reset()
{
	Song = backup_Song;
	SongSection = backup_SongSection;
}

simulated function PlayerPawn GetLocalPlayerPawn()
{
	local Pawn P;
	local PlayerPawn PP;

	if ( NetMode==NM_DedicatedServer )
		Return None;
	else if ( LocalPlayer!=None )
		Return LocalPlayer;
	if ( NetMode==NM_Client )
	{
		ForEach AllActors(Class'PlayerPawn',PP)
		{
			if ( PP.Player!=None && NetConnection(PP.Player)==None )
			{
				LocalPlayer = PP;
				Return PP;
			}
		}
	}
	else
	{
		For( P=PawnList; P!=None; P=P.NextPawn )
		{
			PP = PlayerPawn(P);
			if ( PP!=None && PP.Player!=None && NetConnection(PP.Player)==None )
			{
				LocalPlayer = PP;
				Return PP;
			}
		}
	}
	Return None;
}

defaultproperties
{
				TimeDilation=1.000000
				Title="Untitled"
				Author="Anonymous"
				VisibleGroups="None"
				bHighDetailMode=True
				EdBuildOpt=149007
				CdTrack=255
				Brightness=1.000000
				DefaultTexture=Texture'Engine.DefaultTexture'
				WhiteTexture=Texture'Engine.WhiteTexture'
				TemplateLightTex=Texture'Engine.S_Lightgrey'
				FootprintManager=Class'Engine.FootStepManager'
				bWorldGeometry=True
				bHiddenEd=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:26.000 - Creation time: zo 11-11-2012 21:14:19.084 - Created with UnCodeX