Mostly Harmless

UE3:GameReplicationInfo (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site

Jump to: navigation, search
UT3 Object >> Actor >> Info >> ReplicationInfo >> GameReplicationInfo

Contents

Package: 
Engine
Direct subclass:
UTGameReplicationInfo
This class in other games:
RTNP, U1, U2, U2XMP, UDK, UE2Runtime, UT, UT2003, UT2004

GameReplicationInfo. Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

Every GameInfo creates a GameReplicationInfo, which is always relevant, to replicate important game data to clients (as the GameInfo is not replicated).

[edit] Properties

[edit] Property group 'GameReplicationInfo'

[edit] AdminEmail

Type: string

Modifiers: databinding, globalconfig

Email address of the server admin.

[edit] AdminName

Type: string

Modifiers: databinding, globalconfig

Name of the server admin.

[edit] MessageOfTheDay

Type: string

Modifiers: databinding, globalconfig


Default value: "Welcome to a UT3 Server!"

[edit] ServerName

Type: string

Modifiers: databinding, globalconfig

Name of the server, i.e.: Bob's Server.

[edit] ServerRegion

Type: int

Modifiers: databinding, globalconfig

Region of the game server.

[edit] ShortName

Type: string

Modifiers: databinding, globalconfig

Abbreviated name of server, i.e.: B's Serv (stupid example)

Default value: "UT3 Server"

[edit] Internal variables

[edit] bIsArbitrated

Type: bool

Used to determine who handles session ending

[edit] bMatchHasBegun

Type: bool

Modifiers: repnotify


[edit] bMatchIsOver

Type: bool

Modifiers: repnotify


[edit] bNeedsOnlineCleanup

Type: bool

Used to determine if the end of match/session clean up is needed. Game invites might have already cleaned up the match/session so doing so again would break the traveling to the invited game

[edit] bStopCountDown

Type: bool


Default value: True

[edit] bTrackStats

Type: bool


[edit] CurrentGameData

Type: CurrentGameDataStore

Modifiers: private

The data store instance responsible for presenting state data for the current game session.

[edit] ElapsedTime

Type: int

Modifiers: databinding


[edit] GameClass

Type: class<GameInfo>

Class of the server's gameinfo, assigned by GameInfo.

[edit] GoalScore

Type: int

Modifiers: databinding


[edit] InactivePRIArray

Type: array<PlayerReplicationInfo>

This list mirrors the GameInfo's list of inactive PRI objects

[edit] MatchID

Type: int


[edit] MaxLives

Type: int

Modifiers: databinding


[edit] PRIArray

Type: array<PlayerReplicationInfo>

Array of all PlayerReplicationInfos, maintained on both server and clients (PRIs are always relevant)

[edit] RemainingMinute

Type: int

Modifiers: databinding


[edit] RemainingTime

Type: int

Modifiers: databinding


[edit] SecondCount

Type: float

Modifiers: databinding


[edit] Teams

Type: array<TeamInfo>

Modifiers: databinding


[edit] TimeLimit

Type: int

Modifiers: databinding


[edit] Winner

Type: Actor

Modifiers: databinding

set by gameinfo when game ends

[edit] Default values

Property Value
TickGroup TG_DuringAsyncWork

[edit] Functions

[edit] Native functions

[edit] OnSameTeam

simulated native function bool OnSameTeam (Actor A, Actor B)

Checks to see if two actors are on the same team.

Returns:

True if both actors are on the same team, False otherwise.

Native implementation:

UBOOL AGameReplicationInfo::OnSameTeam(AActor *A, AActor *B)
{
        if ( !A || !B )
        {
                return FALSE;
        }
 
        if ( GameClass )
        {
                AGameInfo *DefaultGameActor = GameClass->GetDefaultObject<AGameInfo>();
                if ( DefaultGameActor && !DefaultGameActor->bTeamGame )
                {
                        return FALSE;
                }
        }
 
        BYTE ATeamIndex = A->GetTeamNum();
        if ( ATeamIndex == 255 )
        {
                return FALSE;
        }
 
        BYTE BTeamIndex = B->GetTeamNum();
        if ( BTeamIndex == 255 )
        {
                return FALSE;
        }
 
        return ( ATeamIndex == BTeamIndex );
}

[edit] Events

[edit] Destroyed

simulated event Destroyed ()

Overrides: Actor.Destroyed

Called when this actor is destroyed

[edit] OnlineSession_EndMatch

simulated event OnlineSession_EndMatch ()

Signal that this match is over.

NETWORK - Both Client and Server

[edit] OnlineSession_EndSession

simulated event OnlineSession_EndSession (bool bForced)

Signal that this session is over. Called natively

NETWORK - Both Client and Server

[edit] OnlineSession_StartMatch

simulated event OnlineSession_StartMatch ()

Signal that this match has begun

NETWORK - Both Client and Server

[edit] PostBeginPlay

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


[edit] ReplicatedEvent

simulated event ReplicatedEvent (name VarName)

Overrides: Actor.ReplicatedEvent


[edit] Reset

event Reset ()

Overrides: Actor.Reset


[edit] Timer

simulated event Timer ()

Overrides: Actor.Timer


[edit] Other instance functions

[edit] AddPRI

simulated function AddPRI (PlayerReplicationInfo PRI)


[edit] CleanupGameDataStore

simulated function CleanupGameDataStore ()

Unregisters the data store for the current game session.

[edit] EndGame

simulated function EndGame ()

Called on the server when the match is over

Network - Server and Client (Via ReplicatedEvent)

[edit] FindPlayerByID

simulated function PlayerReplicationInfo FindPlayerByID (int PlayerID)


[edit] GetOnlineGameInterface

simulated function OnlineGameInterface GetOnlineGameInterface ()

Returns:

a reference to the OnlineGameInterface if one exists. Network: Client and Server

[edit] GetPRIArray

simulated function GetPRIArray (out array<PlayerReplicationInfopris)


[edit] InitializeGameDataStore

simulated function InitializeGameDataStore ()

Creates and registers a data store for the current game session.

[edit] InOrder

simulated function bool InOrder (PlayerReplicationInfo P1, PlayerReplicationInfo P2)

returns true if P1 should be sorted before P2

[edit] IsCoopMultiplayerGame

simulated function bool IsCoopMultiplayerGame ()

Is the current gametype a coop multiplayer game?

[edit] IsMultiplayerGame

simulated function bool IsMultiplayerGame ()

Is the current gametype a multiplayer game?

[edit] OnDestroyOnlineGameComplete

function OnDestroyOnlineGameComplete (bool bWasSuccessful)


[edit] PreventPause

simulated function bool PreventPause ()

hook to allow the GRI to prevent pausing; used when it's performing asynch tasks that must be completed

[edit] RemovePRI

simulated function RemovePRI (PlayerReplicationInfo PRI)


[edit] SetTeam

simulated function SetTeam (int Index, TeamInfo TI)

Assigns the specified TeamInfo to the location specified.

Parameters:

  • Index - location in the Teams array to place the new TeamInfo.
  • TI - the TeamInfo to assign

[edit] SortPRIArray

simulated function SortPRIArray ()


[edit] StartMatch

simulated function StartMatch ()

Called on the server when the match has begin

Network - Server and Client (Via ReplicatedEvent)