Engine
Class LevelInfo

source: c:\runehov\Engine\Classes\LevelInfo.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.ZoneInfo
            |
            +--Engine.LevelInfo
Direct Known Subclasses:None

class LevelInfo
extends Engine.ZoneInfo

//============================================================================= // 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. //=============================================================================
Variables
 int AIProfile[8]
           TEMP statistics
 string Author
           Who built it.
 float AvgAITime
           moving average of Actor time
 float Brightness
           Time to fade in
 string BuildNumber
           RUNE: Build number: engine.int
 string ComputerName
           Machine's name according to the OS.
 int Day
           Day of month.
 int DayOfWeek
           Day of week.
 class DefaultGameType
           RUNE: Build number: engine.int
 Texture DefaultTexture
           Time to fade in
 enum ELevelAction
           Time to fade in
 enum ENetMode
           Time to fade in
 string EngineVersion
           Engine version.
 float FadeRate
           Time to fade in
 GameInfo Game
           RUNE: Build number: engine.int
 string GameVersion
           RUNE: Game version
 int Hour
           Hour.
 int HubStackLevel
           Time to fade in
 string IdealPlayerCount
           Ideal number of players for this level. I.E.: 6-8
 string LevelEnterText
           Message to tell players when they enter.
 string LocalizedPkg
           Package to look in for localizations.
 int Millisecond
           Millisecond.
 string MinNetVersion
           Min engine version that is net compatible.
 int Minute
           Minute.
 int Month
           Month.
 NavigationPoint NavigationPointList
           RUNE: Build number: engine.int
 float NextSwitchCountdown
           RUNE: Build number: engine.int
 string NextURL
           RUNE: Build number: engine.int
 string Pauser
           If paused, name of person pausing the game.
 Pawn PawnList
           RUNE: Build number: engine.int
 int RecommendedEnemies
           number of enemy bots recommended (used by rated games)
 int RecommendedTeammates
           number of friendly bots recommended (used by rated games)
 Texture Screenshot
           Time to fade in
 int Second
           Second.
 SpawnNotify SpawnNotify
           enable texture-specific physics code for Pawns.
 LevelSummary Summary
           If paused, name of person pausing the game.
 float TimeDilation
           Normally 1 - scales real time passage.
 float TimeSeconds
           Time in seconds since level began play.
 string Title
           Millisecond.
 int Year
           Year.
 bool bAggressiveLOD
           frame rate is well below DesiredFrameRate, so make LOD more aggressive
 bool bAllowFOV
           Only allow "human" player pawns in this level
 bool bBegunPlay
           Whether gameplay has begun.
 bool bCheckWalkSurfaces
           enable texture-specific physics code for Pawns.
 bool bDropDetail
           frame rate is below DesiredFrameRate, so drop high detail actors
 bool bFadeIn
           Start completely black and fade in
 bool bHighDetailMode
           Client high-detail mode.
 bool bHumansOnly
           Only allow "human" player pawns in this level
 bool bLonePlayer
           No multiplayer coordination, i.e. for entranceways.
 bool bNeverPrecache
           Time to fade in
 bool bNextItems
           RUNE: Build number: engine.int
 bool bNoCheating
           Only allow "human" player pawns in this level
 bool bPlayersOnly
           Only update players.
 bool bStartup
           Starting gameplay.


Function Summary
 
simulated
Debug(Canvas canvas, int mode)
 string GetAddressURL()
     
//
// Return the URL of this level, which may possibly
// exist on a remote machine.
//
 string GetLocalURL()
     
//
// Return the URL of this level on the local machine.
//
 EMatterType MatterForJoint(int joint)
     
//============================================================
//
// MatterForJoint
//
// Returns what kind of material joint is associated with
//============================================================
 
simulated
PreBeginPlay()
     
// RUNE:  CD Audio restart functionality



Source Code


00001	//=============================================================================
00002	// LevelInfo contains information about the current level. There should 
00003	// be one per level and it should be actor 0. UnrealEd creates each level's 
00004	// LevelInfo automatically so you should never have to place one
00005	// manually.
00006	//
00007	// The ZoneInfo properties in the LevelInfo are used to define
00008	// the properties of all zones which don't themselves have ZoneInfo.
00009	//=============================================================================
00010	class LevelInfo extends ZoneInfo
00011		native;
00012	//	nativereplication;
00013	
00014	// Textures.
00015	#exec Texture Import File=Textures\DefaultTexture.pcx
00016	
00017	//-----------------------------------------------------------------------------
00018	// Level time.
00019	
00020	// Time passage.
00021	var() float TimeDilation;          // Normally 1 - scales real time passage.
00022	
00023	// Current time.
00024	var           float	TimeSeconds;   // Time in seconds since level began play.
00025	var transient int   Year;          // Year.
00026	var transient int   Month;         // Month.
00027	var transient int   Day;           // Day of month.
00028	var transient int   DayOfWeek;     // Day of week.
00029	var transient int   Hour;          // Hour.
00030	var transient int   Minute;        // Minute.
00031	var transient int   Second;        // Second.
00032	var transient int   Millisecond;   // Millisecond.
00033	
00034	//-----------------------------------------------------------------------------
00035	// Text info about level.
00036	
00037	var() localized string Title;
00038	var()           string Author;		    // Who built it.
00039	var() localized string IdealPlayerCount;// Ideal number of players for this level. I.E.: 6-8
00040	var() int	RecommendedEnemies;			// number of enemy bots recommended (used by rated games)
00041	var() int	RecommendedTeammates;		// number of friendly bots recommended (used by rated games)
00042	var() localized string LevelEnterText;  // Message to tell players when they enter.
00043	var()           string LocalizedPkg;    // Package to look in for localizations.
00044	var             string Pauser;          // If paused, name of person pausing the game.
00045	var levelsummary Summary;
00046	
00047	//-----------------------------------------------------------------------------
00048	// Flags affecting the level.
00049	
00050	var() bool           bLonePlayer;     // No multiplayer coordination, i.e. for entranceways.
00051	var bool             bBegunPlay;      // Whether gameplay has begun.
00052	var bool             bPlayersOnly;    // Only update players.
00053	var bool             bHighDetailMode; // Client high-detail mode.
00054	var bool			 bDropDetail;	  // frame rate is below DesiredFrameRate, so drop high detail actors
00055	var bool			 bAggressiveLOD;  // frame rate is well below DesiredFrameRate, so make LOD more aggressive
00056	var bool             bStartup;        // Starting gameplay.
00057	var() bool			 bHumansOnly;	  // Only allow "human" player pawns in this level
00058	var bool			 bNoCheating;	  
00059	var bool			 bAllowFOV;
00060	var() bool 			 bFadeIn;		  // Start completely black and fade in
00061	var() float			 FadeRate;		  // Time to fade in
00062	
00063	//-----------------------------------------------------------------------------
00064	// Audio properties.
00065	
00066	var(Audio) const music  Song;          // Default song for level.
00067	var(Audio) const byte   SongSection;   // Default song order for level.
00068	var(Audio) const byte   CdTrack;       // Default CD track for level.
00069	var(Audio) const float	CdTrackLength; // RUNE:  Length before the CD Track should repeat (0 = NoRepeat)
00070	var(Audio) float        PlayerDoppler; // Player doppler shift, 0=none, 1=full.
00071	
00072	//-----------------------------------------------------------------------------
00073	// Miscellaneous information.
00074	
00075	var() float Brightness;
00076	var() texture Screenshot;
00077	var texture DefaultTexture;
00078	var int HubStackLevel;
00079	var transient enum ELevelAction
00080	{
00081		LEVACT_None,
00082		LEVACT_Loading,
00083		LEVACT_Saving,
00084		LEVACT_Connecting,
00085		LEVACT_Precaching
00086	} LevelAction;
00087	
00088	//-----------------------------------------------------------------------------
00089	// Renderer Management.
00090	var() bool bNeverPrecache;
00091	
00092	//-----------------------------------------------------------------------------
00093	// Networking.
00094	
00095	var enum ENetMode
00096	{
00097		NM_Standalone,        // Standalone game.
00098		NM_DedicatedServer,   // Dedicated server, no local client.
00099		NM_ListenServer,      // Listen server.
00100		NM_Client             // Client only, no local server.
00101	} NetMode;
00102	var string ComputerName;  // Machine's name according to the OS.
00103	var string EngineVersion; // Engine version.
00104	var string MinNetVersion; // Min engine version that is net compatible.
00105	var string GameVersion;				// RUNE: Game version
00106	var localized string BuildNumber;	// RUNE: Build number: engine.int
00107	
00108	//-----------------------------------------------------------------------------
00109	// Gameplay rules
00110	
00111	var() class<gameinfo> DefaultGameType;
00112	var GameInfo Game;
00113	
00114	//-----------------------------------------------------------------------------
00115	// Navigation point and Pawn lists (chained using nextNavigationPoint and nextPawn).
00116	
00117	var const NavigationPoint NavigationPointList;
00118	var const Pawn PawnList;
00119	
00120	//-----------------------------------------------------------------------------
00121	// Server related.
00122	
00123	var string NextURL;
00124	var bool bNextItems;
00125	var float NextSwitchCountdown;
00126	
00127	//-----------------------------------------------------------------------------
00128	// Actor Performance Management
00129	
00130	var int AIProfile[8]; // TEMP statistics
00131	var float AvgAITime;	//moving average of Actor time
00132	
00133	//-----------------------------------------------------------------------------
00134	// Physics control
00135	
00136	var() bool bCheckWalkSurfaces; // enable texture-specific physics code for Pawns.
00137	
00138	//-----------------------------------------------------------------------------
00139	// Spawn notification list
00140	var SpawnNotify SpawnNotify;
00141	
00142	//-----------------------------------------------------------------------------
00143	// Functions.
00144	
00145	//
00146	// Return the URL of this level on the local machine.
00147	//
00148	native simulated function string GetLocalURL();
00149	
00150	//
00151	// Return the URL of this level, which may possibly
00152	// exist on a remote machine.
00153	//
00154	native simulated function string GetAddressURL();
00155	
00156	//
00157	// Jump the server to a new level.
00158	//
00159	event ServerTravel( string URL, bool bItems )
00160	{
00161		if( NextURL=="" )
00162		{
00163			bNextItems          = bItems;
00164			NextURL             = URL;
00165			if( Game!=None )
00166				Game.ProcessServerTravel( URL, bItems );
00167			else
00168				NextSwitchCountdown = 0;
00169		}
00170	}
00171	
00172	//============================================================
00173	//
00174	// MatterForJoint
00175	//
00176	// Returns what kind of material joint is associated with
00177	//============================================================
00178	function EMatterType MatterForJoint(int joint)
00179	{
00180		return MATTER_STONE;
00181	}
00182	
00183	// RUNE:  CD Audio restart functionality
00184	simulated function PreBeginPlay()
00185	{
00186		Super.PreBeginPlay();
00187	
00188		// Restart CD music every <blah> minutes (right now, 10 seconds)
00189		if(CdTrack != 255)
00190		{
00191			Spawn(class'CDThinker');
00192		}
00193	}
00194	
00195	//-----------------------------------------------------------------------------
00196	// Network replication.
00197	
00198	replication
00199	{
00200		reliable if( Role==ROLE_Authority )
00201			Pauser, TimeDilation, bNoCheating, bAllowFOV;
00202	}
00203	
00204	simulated function Debug(Canvas canvas, int mode)
00205	{
00206		Super.Debug(canvas, mode);
00207	
00208		Canvas.DrawText("LevelInfo:");
00209		Canvas.CurY -= 8;
00210		Canvas.DrawText("  Game:                " $ Game);
00211		Canvas.CurY -= 8;
00212		Canvas.DrawText("  bLonePlayer:         " $ bLonePlayer);
00213		Canvas.CurY -= 8;
00214		Canvas.DrawText("  bBegunPlay:          " $ bBegunPlay);
00215		Canvas.CurY -= 8;
00216		Canvas.DrawText("  bPlayersOnly:        " $ bPlayersOnly);
00217		Canvas.CurY -= 8;
00218		Canvas.DrawText("  bHighDetailMode:     " $ bHighDetailMode);
00219		Canvas.CurY -= 8;
00220		Canvas.DrawText("  bDropDetail:         " $ bDropDetail);
00221		Canvas.CurY -= 8;
00222		Canvas.DrawText("  bAggressiveLOD:      " $ bAggressiveLOD);
00223		Canvas.CurY -= 8;
00224		Canvas.DrawText("  bStartup:            " $ bStartup);
00225		Canvas.CurY -= 8;
00226		Canvas.DrawText("  bHumansOnly:         " $ bHumansOnly);
00227		Canvas.CurY -= 8;
00228		Canvas.DrawText("  bNoCheating:         " $ bNoCheating);
00229		Canvas.CurY -= 8;
00230		Canvas.DrawText("  bAllowFOV:           " $ bAllowFOV);
00231		Canvas.CurY -= 8;
00232		Canvas.DrawText("  DefaultGameType:     " $ DefaultGameType);
00233		Canvas.CurY -= 8;
00234		Canvas.DrawText("  NavPointList:        " $ NavigationPointList);
00235		Canvas.CurY -= 8;
00236		Canvas.DrawText("  PawnList:            " $ PawnList);
00237		Canvas.CurY -= 8;
00238		Canvas.DrawText("  NextURL:             " $ NextURL);
00239		Canvas.CurY -= 8;
00240		Canvas.DrawText("  bNextItems:          " $ bNextItems);
00241		Canvas.CurY -= 8;
00242		Canvas.DrawText("  NextSwitchCountdown: " $ NextSwitchCountdown);
00243	
00244	}
00245	
00246	defaultproperties
00247	{
00248	     TimeDilation=1.000000
00249	     Title="Untitled"
00250	     bHighDetailMode=True
00251	     FadeRate=1.000000
00252	     CdTrack=255
00253	     Brightness=1.000000
00254	     DefaultTexture=Texture'Engine.DefaultTexture'
00255	     bHiddenEd=True
00256	     bSweepable=True
00257	}

End Source Code