XIII
Class XIIIGameReplicationInfo

source: C:\XIII\XIII\Classes\XIIIGameReplicationInfo.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.ReplicationInfo
            |
            +--Engine.GameReplicationInfo
               |
               +--XIII.XIIIGameReplicationInfo
Direct Known Subclasses:None

class XIIIGameReplicationInfo
extends Engine.GameReplicationInfo

//----------------------------------------------------------- // //-----------------------------------------------------------
Variables
 string EndGameMessage
           Here because Level.Game not relevant to clients (?)
 int SoundFlagState0
           1=FlagReturn 2=FlagDrop 3=FlagScore 4=FlagPick
 int SoundFlagState1
           1=FlagReturn 2=FlagDrop 3=FlagScore 4=FlagPick
 int XIIIRemainingTime
           Set there because remaining time is not replicated the right way (only bNetInitial) :(
 bPlayedLastMinute, bPlayedTimeLimit
           1=FlagReturn 2=FlagDrop 3=FlagScore 4=FlagPick
 hLastMinute, hTimeLimit
           1=FlagReturn 2=FlagDrop 3=FlagScore 4=FlagPick
 int iGameState
           to know client side in what state is the gameinfo


Function Summary
 
simulated
Timer()
     
//_____________________________________________________________________________



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class XIIIGameReplicationInfo extends GameReplicationInfo;
00005	
00006	var string EndGameMessage;    // Here because Level.Game not relevant to clients (?)
00007	var int iGameState;           // to know client side in what state is the gameinfo
00008	// == 1 if map just launched (to display startup screen).
00009	// == 2 if match running
00010	// == 3 if match ended
00011	var int XIIIRemainingTime;    // Set there because remaining time is not replicated the right way (only bNetInitial) :(
00012	
00013	// Below array replication don't work, replaced by separate vars, works ?!?
00014	//var int SoundFlagState[2];    // 1=FlagReturn 2=FlagDrop 3=FlagScore 4=FlagPick
00015	var int SoundFlagState0;    // 1=FlagReturn 2=FlagDrop 3=FlagScore 4=FlagPick
00016	var int SoundFlagState1;    // 1=FlagReturn 2=FlagDrop 3=FlagScore 4=FlagPick
00017	var sound hLastMinute, hTimeLimit;
00018	var bool bPlayedLastMinute, bPlayedTimeLimit;
00019	
00020	//_____________________________________________________________________________
00021	replication
00022	{
00023	    reliable if ( Role == ROLE_Authority )
00024	      EndGameMessage, iGameState, XIIIRemainingTime, SoundFlagState0, SoundFlagState1;
00025	}
00026	
00027	//_____________________________________________________________________________
00028	simulated function Timer()
00029	{
00030	    Super.Timer();
00031	
00032	    if ( TimeLimit == 0 )
00033	      return;
00034	
00035	//    Log("RT="$XIIIRemainingTime);
00036	    if ( bPlayedLastMinute && (XIIIRemainingTime > 60) )
00037	    {
00038	//      Log("GRI Reset LM & TL");
00039	      bPlayedLastMinute = false;
00040	      bPlayedTimeLimit = false;
00041	      return;
00042	    }
00043	    else if ( bPlayedTimeLimit && (XIIIRemainingTime > 0) )
00044	    {
00045	//      Log("GRI Reset TL");
00046	      bPlayedTimeLimit = false;
00047	    }
00048	    if ( !bPlayedLastMinute && (XIIIRemainingTime <= 60) )
00049	    {
00050	//      Log("GRI LastMinute");
00051	      bPlayedLastMinute = true;
00052	      PlayMenu(hLastMinute);
00053	      if ( Level.NetMode != NM_Client )
00054	        BroadCastLocalizedMessage(class'XIIIMultiMessage',6);
00055	    }
00056	    if ( !bPlayedTimeLimit && (XIIIRemainingTime <= 0) )
00057	    {
00058	//      Log("GRI TimeLimit");
00059	      bPlayedTimeLimit = true;
00060	      PlayMenu(hTimeLimit);
00061	    }
00062	}
00063	
00064	
00065	
00066	defaultproperties
00067	{
00068	     XIIIRemainingTime=120
00069	     SoundFlagState0=3
00070	     SoundFlagState1=3
00071	     hLastMinute=Sound'XIIIsound.Multi__SFXMulti.SFXMulti__hTime1Mn'
00072	     hTimeLimit=Sound'XIIIsound.Multi__SFXMulti.SFXMulti__hTimeLimit'
00073	}

End Source Code