Botpack
Class TournamentGameReplicationInfo

source: e:\games\UnrealTournament\Botpack\Classes\TournamentGameReplicationInfo.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.ReplicationInfo
            |
            +--Engine.GameReplicationInfo
               |
               +--Botpack.TournamentGameReplicationInfo
Direct Known Subclasses:CTFReplicationInfo

class TournamentGameReplicationInfo
extends Engine.GameReplicationInfo

//============================================================================= // TournamentGameReplicationInfo. //=============================================================================
Variables
 int BestFPHs[3]
 string BestPlayers[3]
 string BestRecordDate[3]
 int FragLimit
 HoldString, FreelanceString
 int GoalTeamScore
 string SupportStringTrailer
 TeamInfo Teams[4]
 int TimeLimit
 int TotalDeaths
 int TotalFlags
 int TotalFrags
 int TotalGames


Function Summary
 string GetOrderString(PlayerReplicationInfo PRI)
 
simulated
PostBeginPlay()



Source Code


00001	//=============================================================================
00002	// TournamentGameReplicationInfo.
00003	//=============================================================================
00004	class TournamentGameReplicationInfo extends GameReplicationInfo;
00005	
00006	var localized string HumanString, CommanderString, SupportString, DefendString, AttackString, HoldString, FreelanceString;
00007	var TeamInfo Teams[4];
00008	
00009	var int GoalTeamScore;
00010	var int FragLimit;
00011	var int TimeLimit;
00012	
00013	var int TotalGames;
00014	var int TotalFrags;
00015	var int TotalDeaths;
00016	var int TotalFlags;
00017	var string BestPlayers[3];
00018	var int BestFPHs[3];
00019	var string BestRecordDate[3];
00020	var localized string SupportStringTrailer;
00021	
00022	replication
00023	{
00024		reliable if ( Role == ROLE_Authority )
00025			Teams, FragLimit, TimeLimit, GoalTeamScore;
00026			
00027		reliable if ( (Role == ROLE_Authority) && bNetInitial )
00028			TotalGames, TotalFrags, TotalDeaths, BestPlayers, BestFPHs, BestRecordDate,
00029			TotalFlags;
00030	}
00031	
00032	simulated function PostBeginPlay()
00033	{
00034		local int i;
00035	
00036		Super.PostBeginPlay();
00037	
00038		if (TournamentGameInfo(Level.Game) != None)
00039		{
00040			TotalGames = TournamentGameInfo(Level.Game).EndStatsClass.Default.TotalGames;
00041			TotalFrags = TournamentGameInfo(Level.Game).EndStatsClass.Default.TotalFrags;
00042			TotalDeaths = TournamentGameInfo(Level.Game).EndStatsClass.Default.TotalDeaths;
00043			TotalFlags = TournamentGameInfo(Level.Game).EndStatsClass.Default.TotalFlags;
00044			for (i=0; i<3; i++)
00045			{
00046				BestPlayers[2-i] = TournamentGameInfo(Level.Game).EndStatsClass.Default.BestPlayers[i];
00047				BestFPHs[2-i] = TournamentGameInfo(Level.Game).EndStatsClass.Default.BestFPHs[i];
00048				BestRecordDate[2-i] = TournamentGameInfo(Level.Game).EndStatsClass.Default.BestRecordDate[i];
00049			}
00050		}
00051	}
00052	
00053	simulated function string GetOrderString(PlayerReplicationInfo PRI)
00054	{
00055		local BotReplicationInfo BRI;
00056	
00057		BRI = BotReplicationInfo(PRI);
00058		if ( BRI == None )
00059		{
00060			if ( PRI.bIsSpectator && !PRI.bWaitingPlayer )
00061				return CommanderString;
00062			return HumanString;
00063		}
00064		if ( BRI.RealOrders == 'follow' )
00065			return SupportString@BRI.RealOrderGiverPRI.PlayerName@SupportStringTrailer;
00066		if ( BRI.RealOrders == 'defend' )
00067		{
00068			if ( (BRI.OrderObject != None)
00069				&& (BRI.OrderObject.IsA('ControlPoint') || BRI.OrderObject.IsA('FortStandard')) )
00070				return DefendString@BRI.OrderObject.GetHumanName();
00071			return DefendString;
00072		}
00073		if ( BRI.RealOrders	== 'freelance' )
00074			return FreelanceString;
00075		if ( BRI.RealOrders	== 'attack' )
00076		{
00077			if ( (BRI.OrderObject != None)
00078				&& (BRI.OrderObject.IsA('ControlPoint') || BRI.OrderObject.IsA('FortStandard')) )
00079				return AttackString@BRI.OrderObject.GetHumanName();
00080			return AttackString;
00081		}
00082		if ( BRI.RealOrders == 'hold' )
00083			return HoldString;
00084	}
00085	
00086	defaultproperties
00087	{
00088	     HumanString="*Human*"
00089	     CommanderString="*Commander*"
00090	     SupportString="supporting"
00091	     DefendString="defending"
00092	     AttackString="attacking"
00093	     HoldString="holding"
00094	     FreelanceString="freelancing"
00095	}

End Source Code