Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
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
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796

    //=============================================================================
    // 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;

    //-----------------------------------------------------------------------------
    // 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.
    var			  float	PauseDelay;		// time at which to start pause

    //-----------------------------------------------------------------------------
    // Level Summary Info

    var(LevelSummary) localized String 	Title;
    var(LevelSummary)           String 	Author;
    #if !IG_TRIBES3	// michaelj:  Use min and max instead
    var(LevelSummary)			int 	RecommendedNumPlayers;
    #endif

    #if IG_TRIBES3	// rowan: name of localisation file for this level
    var(LevelSummary)			String	LocalisationFile;
    #endif

    #if IG_TRIBES3	// michaelj:  Additional information (some integrated from UT2004)
    var(LevelSummary) Array< class<GameInfo> >	SupportedModes				"List of modes that this map supports.";
    var(LevelSummary) Array< int >				SupportedModesScoreLimits	"Parallels the SupportedModes array.  Score limit for each game type.  0 to disable.";
    var(LevelSummary) localized String  Description		"Description of this level.";
    var(LevelSummary)			Material Screenshot		"A screenshot of this level.";
    var(LevelSummary)			int		IdealPlayerCountMin		"Recommended minimum number of players for this level.";
    var(LevelSummary)			int		IdealPlayerCountMax		"Recommended maximum number of players for this level.";
    var(LevelSummary)			String	ExtraInfo;
    #endif

    #if IG_TRIBES3	// rowan: music manager
    var MusicManagerBase		MusicMgr;
    #endif

    var() config enum EPhysicsDetailLevel
    {
    	PDL_Low,
    	PDL_Medium,
    	PDL_High
    } PhysicsDetailLevel;

    // Karma - jag
    var(Karma) float KarmaTimeScale;		// Karma physics timestep scaling.
    var(Karma) float RagdollTimeScale;		// Ragdoll physics timestep scaling. This is applied on top of KarmaTimeScale.
    var(Karma) int   MaxRagdolls;			// Maximum number of simultaneous rag-dolls.
    var(Karma) float KarmaGravScale;		// Allows you to make ragdolls use lower friction than normal.
    var(Karma) bool  bKStaticFriction;		// Better rag-doll/ground friction model, but more CPU.

    var()	   bool bKNoInit;				// Start _NO_ Karma for this level. Only really for the Entry level.
    // jag

    var(Havok)    bool bHavokDisabled;          //  Disable Havok for this level.
    var(Havok)    float HavokStepTimeQuantum;   // Usually 0.016f (1/60) of a sec)
    var(Havok)    string HavokMoppCodeFilename; // The optional filename to load the static (prebuilt) Mopp code from.
    var(Havok)    int HavokBroadPhaseDimension; // Something like 50,000 or so. Must encompase the whole world from the orign

    #if IG_TRIBES3 // Alex:
    var (Havok) bool vehicleCeilingEnabled;
    var (Havok) float vehicleCeilingHeight;
    #endif

    #if IG_TRIBES3 // Alex:
    var() bool bNoPathfinding;
    #endif

    var config float	DecalStayScale;		// 0 to 2 - affects decal stay time

    var() localized string LevelEnterText;  // Message to tell players when they enter.
    var()           string LocalizedPkg;    // Package to look in for localizations.
    var             PlayerReplicationInfo 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
    var transient string SelectedGroups;		// A list of selected groups in the group browser (only used in editor)
    //-----------------------------------------------------------------------------
    // Flags affecting the level.

    var(LevelSummary) bool HideFromMenus;
    var() bool           bLonePlayer;     // No multiplayer coordination, i.e. for entranceways.
    var bool             bBegunPlay;      // Whether gameplay has begun.
    var bool             bPlayersOnly;    // Only update players.
    var const EDetailMode	DetailMode;      // Client 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 config bool		 bLowSoundDetail;
    var	bool			 bPathsRebuilt;	  // True if path network is valid
    var bool			 bHasPathNodes;
    var globalconfig bool bCapFramerate;		// frame rate capped in net play if true (else limit number of servermove updates)
    var	bool			bLevelChange;

    //-----------------------------------------------------------------------------
    // Renderer Management.
    var config bool bNeverPrecache;

    //-----------------------------------------------------------------------------
    // Legend - used for saving the viewport camera positions
    var() vector  CameraLocationDynamic;
    var() vector  CameraLocationTop;
    var() vector  CameraLocationFront;
    var() vector  CameraLocationSide;
    var() rotator CameraRotationDynamic;

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

    var(Audio) string	Song;			// Filename of the streaming song.
    var(Audio) float	PlayerDoppler;	// Player doppler shift, 0=none, 1=full.
    var(Audio) float	MusicVolumeOverride;

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

    var() float Brightness;
    #if !IG_TRIBES3	// michaelj:  Use material in LevelSummary instead (see above)
    var() texture Screenshot;
    #endif
    var texture DefaultTexture;
    var texture WireframeTexture;
    var texture WhiteSquareTexture;
    var texture LargeVertex;
    var int HubStackLevel;
    var transient enum ELevelAction
    {
    	LEVACT_None,
    	LEVACT_Loading,
    	LEVACT_Saving,
    	LEVACT_Connecting,
    	LEVACT_Precaching
    } LevelAction;

    var transient GameReplicationInfo GRI;

    //-----------------------------------------------------------------------------
    // 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 MinNetVersion; // Min engine version that is net compatible.
    #if IG_SHARED // karl:
    var string BuildVersion; // Engine version.
    #endif

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

    var() string DefaultGameType;
    var() string PreCacheGame;
    var GameInfo Game;
    var float DefaultGravity;

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

    var const NavigationPoint NavigationPointList;
    #if IG_TRIBES3
    var transient const Controller ControllerList;
    #else
    var const Controller ControllerList;
    #endif // IG
    var private PlayerController LocalPlayerController;		// player who is client here

    #if IG_SHARED
    var transient const Pawn PawnList;
    #endif

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

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

    //-----------------------------------------------------------------------------
    // Global object recycling pool.

    #if IG_TRIBES3 // Ryan: ObjectPool no longer transient
    var ObjectPool ObjectPool;
    #else
    var transient ObjectPool	ObjectPool;
    #endif // IG

    //-----------------------------------------------------------------------------
    // Additional resources to precache (e.g. Playerskins).

    var transient array<material>	PrecacheMaterials;
    var transient array<staticmesh> PrecacheStaticMeshes;
    #if IG_SHARED	// rowan: precache skeletal meshes
    var transient array<mesh>		PrecacheMeshes;
    #endif

    #if IG_EFFECTS
    var config enum EPlatform
    {
    	PC,
    	PS2,
    	XBOX
    } Platform;

    var IGEffectsSystemBase EffectsSystem;

    var private array<Actor>		InterestedActorsGameStarted;		//these are the Actors who are interested in game started, ie. currently registered for notification
    #endif

    #if IG_SCRIPTING // david:
    var MessageDispatcher messageDispatcher;
    #endif

    #if IG_SCRIPTING // Paul: CutsceneManager class
    var transient Object	cutsceneManager;
    #endif

    #if IG_TRIBES3 // Paul: SpeechManager instance
    var transient SpeechManager speechManager;
    #endif // IG_TRIBES3

    #if IG_SHARED	// marc: class to hang global AI data from
    var Tyrion_Setup	AI_Setup;
    #endif

    #if IG_SHARED || IG_EFFECTS // tcohen: effects needs this to support Actor.bTriggerEffectEventsBeforeGameStarts
    var private transient bool bGameStarted;  // use HasGameStarted() to access
    #endif

    #if IG_MOJO
    var globalconfig bool	bSkipMojoCutscenes;
    var string				MojoFileURL; // URL to the mojo file. Will be blank for a newly loaded level and filled in on level load, used to
    									 // ensure that savegames can find the correct mojo file when loading.
    #endif

    //-----------------------------------------------------------------------------
    // Replication
    var float MoveRepSize;

    // these two properties are valid only during replication
    var const PlayerController ReplicationViewer;	// during replication, set to the playercontroller to
    												// which actors are currently being replicated
    var const Actor  ReplicationViewTarget;				// during replication, set to the viewtarget to
    												// which actors are currently being replicated

    #if IG_MOJO
    var bool bIsMojoPlaying;
    #endif

    #if IG_TRIBES3 // dbeswick: campaign
    var deepcopy Object savedCampaign;	// do not use, access TribesGUIControllerBase.GuiConfig.CurrentCampaign
    #endif

    //-----------------------------------------------------------------------------
    // Team changed interface support

    var array<IInterestedTeamChanged> teamChangedListeners;

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

    #if IG_TRIBES3 // Paul: accessor functions for map data
    native function Material GetMapTexture();
    native function Vector GetMapTextureOrigin();
    native function float GetMapTextureExtent();
    #endif

    #if IG_SHARED // Ryan: Allow access to the GameSpy manager
    final native function GameSpyManager GetGameSpyManager();
    #endif // IG

    //#if UNREAL_HAVOK

    // Update the collidabilty between two layers (A and B). See the HavokRigidBody.uc for details on
    // layers. If you are doing a few of these updates at once, only updateWorldInfo as true on the last one.
    // updateWorldInfo needs to be set for at least one before the next step, BUT it is slow to do.
    native final function HavokSetCollisionLayerEnabled(int layerA, int layerB, bool enabled, bool updateWorldInfo);

    // If you use collision layers, and want to use the system layers in those, you can use this
    // func to find the next free (unused) system layer (32K of them) and once you call this it will be deemed to be used.
    // Be careful as any object can use which ever layer they like so if you don't use this func
    // for all of them they may overlap if handcoded ones are not very high (this auto starts at 1)
    // Will return -1 if none left.
    native final function HavokGetNextFreeSystemLayer(out int systemLayer);

    //endif

    #if IG_MOJO // rowan:
    native final function PlayMojoCutscene(name cutsceneName);
    native final function PlayAllMojoCutscenes();
    native function bool EscapeCutscene();
    #endif // IG

    native final function UpdateMovementConfiguration();

    native simulated function DetailChange(EDetailMode NewDetailMode);
    native simulated function bool IsEntry();
    #if IG_TRIBES3 // dbeswick:
    native simulated function bool IsPendingActive();
    #endif

    simulated function PostBeginPlay()
    {
    	Super.PostBeginPlay();
    	DecalStayScale = FClamp(DecalStayScale,0,2);
    }

    #if IG_EFFECTS
    simulated function CreateEffectsSystem()
    {
        local class<IGEffectsSystemBase> EffectsSystemClass;

        EffectsSystemClass = class'IGEffectsSystemBase'.static.GetEffectsSystemClass();
    	EffectsSystem = new(self, "EffectsSystem", 0) EffectsSystemClass;
        assertWithDescription(EffectsSystem != None,
            "The EffectsSystem could not be created.  (LevelInfo tried to create a new instance of class "$EffectsSystemClass$")");
    }

    simulated function InitializeEffectsSystem()
    {
    	local float time;
    	time = AppSeconds();
        EffectsSystem.Init(self);
    	time = AppSeconds() - time;

    	log( "LevelInfo::InitializeEffectsSystem() called. Initialised in "$time$" seconds.");
    }
    #endif

    #if IG_TRIBES3 // Ryan: effects system initialisation when loading a save game
    event PostLoadGame()
    {
    	SetupTransientData();
    }
    #endif // IG

    simulated function class<GameInfo> GetGameClass()
    {
    	local class<GameInfo> G;

    	if(Level.Game != None)
    		return Level.Game.Class;

    	if (GRI != None && GRI.GameClass != "")
    		G = class<GameInfo>(DynamicLoadObject(GRI.GameClass,class'Class'));
    	if(G != None)
    		return G;

    	if ( DefaultGameType != "" )
    		G = class<GameInfo>(DynamicLoadObject(DefaultGameType,class'Class'));

    	return G;
    }

    simulated event FillRenderPrecacheArrays()
    {
    	local Actor A;
    	local class<GameInfo> G;

    	if ( NetMode == NM_DedicatedServer )
    		return;
    	if ( Level.Game == None )
    	{
    		if ( (GRI != None) && (GRI.GameClass != "") )
    			G = class<GameInfo>(DynamicLoadObject(GRI.GameClass,class'Class'));
    		if ( (G == None) && (DefaultGameType != "") )
    			G = class<GameInfo>(DynamicLoadObject(DefaultGameType,class'Class'));
    		if ( G == None )
    			G = class<GameInfo>(DynamicLoadObject(PreCacheGame,class'Class'));
    		if ( G != None )
    			G.Static.PreCacheGameRenderData(self);
    	}
    	ForEach AllActors(class'Actor',A)
    	{
    		A.UpdatePrecacheRenderData();
    	}
    }

    #if IG_SHARED	// rowan:
    simulated function AddPrecacheMesh(Mesh mesh)
    {
    	local int i, Index;

    	if ( NetMode == NM_DedicatedServer )
    		return;
        if (mesh == None)
            return;

    	// keep unique items in array
    	// hmmm, need non unique items, so we can create mesh pool instances
    	for (i=0; i<PrecacheMeshes.length; i++)
    	{
    		if (PrecacheMeshes[i] == mesh)
    			return;
    	}

    //	LOG("PRECACHING MESH "$mesh.Name);

        Index = Level.PrecacheMeshes.Length;
    	PrecacheMeshes.Insert(Index, 1);
    	PrecacheMeshes[Index] = mesh;
    }
    #endif

    simulated function AddPrecacheMaterial(Material mat)
    {
        local int i, Index;

    	if ( NetMode == NM_DedicatedServer )
    		return;
        if (mat == None)
            return;

    #if IG_SHARED	// rowan: keep unique entries in array
    	for (i=0; i<PrecacheMaterials.length; i++)
    	{
    		if (PrecacheMaterials[i] == mat)
    			return;
    	}
    #endif

    //	LOG("PRECACHING MATERIAL "$mat.Name);

        Index = Level.PrecacheMaterials.Length;
        PrecacheMaterials.Insert(Index, 1);
    	PrecacheMaterials[Index] = mat;
    }

    simulated function AddPrecacheStaticMesh(StaticMesh stat)
    {
        local int i, Index;

    	if ( NetMode == NM_DedicatedServer )
    		return;
        if (stat == None)
            return;

    #if IG_SHARED	// rowan: keep unique entries in array
    	for (i=0; i<PrecacheStaticMeshes.length; i++)
    	{
    		if (PrecacheStaticMeshes[i] == stat)
    			return;
    	}
    #endif

    //	LOG("PRECACHING STATICMESH "$stat.Name);

        Index = Level.PrecacheStaticMeshes.Length;
        PrecacheStaticMeshes.Insert(Index, 1);
    	PrecacheStaticMeshes[Index] = stat;
    }

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

    //
    // Demo build flag
    //
    native simulated final function bool IsDemoBuild();  // True if this is a demo build.

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

    //
    // Jump the server to a new level.
    //
    event ServerTravel( string URL, bool bItems )
    {
    	if( NextURL=="" )
    	{
    		bLevelChange = true;
    		bNextItems          = bItems;
    		NextURL             = URL;
    		if( Game!=None )
    			Game.ProcessServerTravel( URL, bItems );
    		else
    			NextSwitchCountdown = 0;
    	}
    }

    //
    // ensure the DefaultPhysicsVolume class is loaded.
    //
    function ThisIsNeverExecuted()
    {
    	local DefaultPhysicsVolume P;
    	P = None;
    }

    /* Reset()
    reset actor to initial state - used when restarting level without reloading.
    */
    function Reset()
    {
    	// perform garbage collection of objects (not done during gameplay)
    	ConsoleCommand("OBJ GARBAGE");
    	Super.Reset();
    }

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

    replication
    {
    	reliable if( bNetDirty && Role==ROLE_Authority )
    		Pauser, TimeDilation, DefaultGravity;

    	reliable if( bNetInitial && Role==ROLE_Authority )
    		RagdollTimeScale, KarmaTimeScale, KarmaGravScale;
    }

    #if IG_EFFECTS
    //register for notification that game has started... will get OnGameStarted() call.
    simulated function InternalRegisterNotifyGameStarted(Actor registeree)
    {
    	local int i;

    	for (i=0; i<InterestedActorsGameStarted.length; i++)
    		if (InterestedActorsGameStarted[i] == registeree)
    			AssertWithDescription(false, registeree$" is re-registering for NotifyGameStarted");

    	InterestedActorsGameStarted[InterestedActorsGameStarted.length] = registeree;
    }

    //called by ULevel::Tick on the first frame of the game
    simulated event NotifyGameStarted()
    {
    	local int i;

    	assert(!bGameStarted);
    	log( "LevelInfo::NotifyGameStarted() called on Level '"$Outer.Name$"' that has Label '"$Label$"'");

    //    if (Outer.Name != 'Entry')
    //    {
    #if IG_EFFECTS // Carlos: Moved this from PostBeginPlay so Flushing of queued events happens after the game has started
            Level.InitializeEffectsSystem();
            EffectsSystem.AddPersistentContext(name("Level_"$Label));
    #endif

    	    //notify interested Actors
    	    for (i=0; i<InterestedActorsGameStarted.length; i++)
    		{
    		    InterestedActorsGameStarted[i].OnGameStarted();
    		}
    //    }
    }

    //add a string tag to the current frame about a potentially slow code operation
    simulated function GuardSlow(String GuardString) { assert(false); }
    #endif

    #if IG_SHARED // ckline: notifications upon Pawn death and Actor destruction

    // NOTE: When an object that has previously registered via any of the following
    // RegisterNotifyXXXX() methods is itself destroyed, it will automatically be
    // UnRegistered for all subsequent notifications. Therefore, while possible,
    // it is not necessary for an object to UnRegisterXXX() itself upon destruction.

    // WARNING: These methods only guaranteed send notification during normal
    // gameplay. During level transitions all listeners will be un-registered
    // and no further notifications will be sent to any listeners (unless
    // they re-register themselves when the next level begins).
    //
    // For these reasons, objects should not rely on these notifications for
    // cleanup during level transitions.

    // Register for notification whenever Died() is called on a Pawn, or
    // PawnDied() is called on the pawn's Controller (whichever happens first).
    // See comments in IInterestedPawnDied.uc for additional details.
    //
    // Note: If ObjectToNotify is itself a pawn, it *will* receive notification of its
    // own death.
    native final function RegisterNotifyPawnDied(IInterestedPawnDied ObjectToNotify);
    native final function UnRegisterNotifyPawnDied(IInterestedPawnDied RegisteredObject);

    // Register for notification whenever a Engine.Actor for which bStatic=false
    // is destroyed during gameplay. Static actors will not generate notifications
    // when they are destroyed.
    //
    // See comments in IInterestedActorDestroyed.uc for additional details.
    //
    // WARNING: Even if ObjectToNotify is itself an Actor, it will NOT be
    // notified of its own destruction. If it wishes to handle its own
    // destruction, it should override Pawn.Destroyed().
    native final function RegisterNotifyActorDestroyed(IInterestedActorDestroyed ObjectToNotify);
    native final function UnRegisterNotifyActorDestroyed(IInterestedActorDestroyed RegisteredObject);

    #endif // IG_SHARED

    #if IG_TRIBES3
    // Team change interface
    function registerNotifyTeamChanged( IInterestedTeamChanged objectToNotify )
    {
    	assert( objectToNotify != None );

        teamChangedListeners[teamChangedListeners.Length] = objectToNotify;
    }

    function unRegisterNotifyTeamChanged( IInterestedTeamChanged registeredObject )
    {
        local int i;

        assert( registeredObject != None );

        for( i = 0; i < teamChangedListeners.Length; ++i )
        {
            if ( teamChangedListeners[i] == registeredObject )
            {
                teamChangedListeners.Remove(i, 1);
                break;
            }
        }
    }

    function notifyListenersTeamChanged( Pawn pawn )
    {
    	local int i;
    	local IInterestedTeamChanged listener;

        //log( "+++ Received notification that" @ pawn.name @ "has changed team" );

        for ( i = 0; i < teamChangedListeners.length; ++i )
        {
            listener = teamChangedListeners[i];
    		//log( "+++    -> Notifying" @ listener.name );
    		listener.onTeamChanged( pawn );
        }
    }
    #endif

    //
    //	PreBeginPlay
    //

    simulated event PreBeginPlay()
    {
    	// Create the object pool.
    #if IG_TRIBES3 // Ryan: ObjectPool no longer transient
    	ObjectPool = new class'ObjectPool';
    #else
    	ObjectPool = new(none) class'ObjectPool';
    #endif // IG

    #if IG_SCRIPTING // david:
    	MessageDispatcher = new class'MessageDispatcher';
    #endif

    #if IG_SHARED	// marc: class to hang global AI data from
    	AI_Setup = spawn( class<Tyrion_Setup>( DynamicLoadObject( "Tyrion.Setup", class'Class') ));
    #endif

    #if IG_TRIBES3 // rowan: called by prebeginplay and postloadgame
    	SetupTransientData();
    #endif
    }

    #if IG_TRIBES3 // rowan: called by prebeginplay and postloadgame
    simulated function SetupTransientData()
    {
    #if IG_EFFECTS
    	CreateEffectsSystem();
    #endif

    #if IG_SCRIPTING // Paul: Cutscene manager initialisation
    	cutsceneManager = new Class(DynamicLoadObject( "Scripting.CutsceneManager", class'Class'));
    #endif
    }
    #endif

    #if IG_SHARED || IG_EFFECTS // tcohen: effects needs this to support Actor.bTriggerEffectEventsBeforeGameStarts

    simulated function bool HasGameStarted()
    {
        return bGameStarted;
    }
    #endif // IG_SHARED || IG_EFFECTS

    simulated event PlayerController GetLocalPlayerController()
    {
    	local PlayerController PC;

    	if ( Level.NetMode == NM_DedicatedServer )
    		return None;
    	if ( LocalPlayerController != None )
    		return LocalPlayerController;

    	ForEach DynamicActors(class'PlayerController', PC)
    	{
    // IGB: mcj-- I'm commenting this test out. The player doesn't appear to have a
    // Viewport by this point. Mongo says that there is only one PlayerController in
    // a network game, so it's irrelevant whether it has a viewport or not.
    		// Actually, this is only true on the client. On the server, though, the
    		// LocalPlayerController variable is set before the second PlayerController is
    		// created, so this should work. It's a hack, though, so we need a better way.
    		// The viewport thing below doesn't work.
    #if !IG_SHARED
    		if ( Viewport(PC.Player) != None )
    		{
    #endif
    			LocalPlayerController = PC;
    			break;
    #if !IG_SHARED
    		}
    #endif
    	}
    	return LocalPlayerController;
    }

    #if IG_TRIBES3 // dbeswick: added AllControllers iterator: iterates through the level's controller list
    native iterator function AllControllers( class<Controller> BaseClass, out actor Actor );
    #endif

    #if IG_TRIBES3 // dbeswick: this function is called to determine whether a projectile can hit this actor
    simulated event bool ShouldProjectileHit(Actor projInstigator)
    {
    	return true;
    }
    #endif

    defaultproperties
    {
    	PreCacheGame="Engine.GameInfo"
        RemoteRole=ROLE_DumbProxy
    	 bAlwaysRelevant=true
         TimeDilation=+00001.000000
    	 Brightness=1
         bHiddenEd=True
    	 DefaultTexture=DefaultTexture
    	 WireframeTexture=Texture'Engine_res.WireframeTexture'
    	 WhiteSquareTexture=WhiteSquareTexture
    	 LargeVertex=Texture'Engine_res.LargeVertex'
    	 HubStackLevel=0
    	 DetailMode=DM_SuperHigh
    	 PlayerDoppler=0
    	 bWorldGeometry=true
    	 VisibleGroups="None"
             KarmaTimeScale=0.9
             RagdollTimeScale=1
             MaxRagdolls=4
             bKStaticFriction=true
             KarmaGravScale=1
    	 PhysicsDetailLevel=PDL_High
        DefaultGravity=-1160
    	bCapFramerate=true

    	HavokBroadPhaseDimension=524288 // WORLD_MAX. Reduce this if you can. Check in the VDB to see Broad Phase size.

         Title="Untitled"
        MoveRepSize=+42.0
        MusicVolumeOverride=-1

    //#if IG_SHARED // ckline: set DecalStayScale default to 1, old default of 0 means no ProjectedDecals show up!
        DecalStayScale=1.0
    //#endif

    //#if IG_TRIBES3	// michaelj:  set some liberal ceiling defaults
    	vehicleCeilingEnabled = true
    	vehicleCeilingHeight = 3000
    //#endif
    }

Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

Class file time: ne 5.9.2004 16:01:26.000 - Creation time: st 23.5.2018 00:10:44.993 - Created with UnCodeX