Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:GameReplicationInfo (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 00:56, 26 July 2008 by Wormbo (Talk | contribs) (updaterd for v1.3beta4)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT3 Object >> Actor >> Info >> ReplicationInfo >> GameReplicationInfo
Package: 
Engine
Direct subclass:
UTGameReplicationInfo
This class in other games:
RTNP, U1, UT, U2XMP, UE2Runtime, UT2003, U2, UT2004, UDK

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).

Properties

Property group 'GameReplicationInfo'

AdminEmail

Type: string

Modifiers: databinding, globalconfig

Email address of the server admin.

AdminName

Type: string

Modifiers: databinding, globalconfig

Name of the server admin.

MessageOfTheDay

Type: string

Modifiers: databinding, globalconfig


Default value: "Welcome to a UT3 Server!"

ServerName

Type: string

Modifiers: databinding, globalconfig

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

ServerRegion

Type: int

Modifiers: databinding, globalconfig

Region of the game server.

ShortName

Type: string

Modifiers: databinding, globalconfig

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

Default value: "UT3 Server"

Internal variables

bIsArbitrated

Type: bool

Used to determine who handles session ending

bMatchHasBegun

Type: bool

Modifiers: repnotify


bMatchIsOver

Type: bool

Modifiers: repnotify


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

bStopCountDown

Type: bool


Default value: True

bTrackStats

Type: bool


CurrentGameData

Type: CurrentGameDataStore

Modifiers: private

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

ElapsedTime

Type: int

Modifiers: databinding


GameClass

Type: class<GameInfo>

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

GoalScore

Type: int

Modifiers: databinding


InactivePRIArray

Type: array<PlayerReplicationInfo>

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

MatchID

Type: int


MaxLives

Type: int

Modifiers: databinding


PRIArray

Type: array<PlayerReplicationInfo>

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

RemainingMinute

Type: int

Modifiers: databinding


RemainingTime

Type: int

Modifiers: databinding


SecondCount

Type: float

Modifiers: databinding


Teams

Type: array<TeamInfo>

Modifiers: databinding


TimeLimit

Type: int

Modifiers: databinding


Winner

Type: Actor

Modifiers: databinding

set by gameinfo when game ends

Default values

Property Value
TickGroup TG_DuringAsyncWork

Functions

Native functions

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 );
}

Events

Destroyed

simulated event Destroyed ()

Overrides: Actor.Destroyed

Called when this actor is destroyed

OnlineSession_EndMatch

simulated event OnlineSession_EndMatch ()

Signal that this match is over.

NETWORK - Both Client and Server

OnlineSession_EndSession

simulated event OnlineSession_EndSession (bool bForced)

Signal that this session is over. Called natively

NETWORK - Both Client and Server

OnlineSession_StartMatch

simulated event OnlineSession_StartMatch ()

Signal that this match has begun

NETWORK - Both Client and Server

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


ReplicatedEvent

simulated event ReplicatedEvent (name VarName)

Overrides: Actor.ReplicatedEvent


Reset

event Reset ()

Overrides: Actor.Reset


Timer

simulated event Timer ()

Overrides: Actor.Timer


Other instance functions

AddPRI

simulated function AddPRI (PlayerReplicationInfo PRI)


CleanupGameDataStore

simulated function CleanupGameDataStore ()

Unregisters the data store for the current game session.

EndGame

simulated function EndGame ()

Called on the server when the match is over

Network - Server and Client (Via ReplicatedEvent)

FindPlayerByID

simulated function PlayerReplicationInfo FindPlayerByID (int PlayerID)


GetOnlineGameInterface

simulated function OnlineGameInterface GetOnlineGameInterface ()

Returns:

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

GetPRIArray

simulated function GetPRIArray (out array<PlayerReplicationInfopris)


InitializeGameDataStore

simulated function InitializeGameDataStore ()

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

InOrder

simulated function bool InOrder (PlayerReplicationInfo P1, PlayerReplicationInfo P2)

returns true if P1 should be sorted before P2

IsCoopMultiplayerGame

simulated function bool IsCoopMultiplayerGame ()

Is the current gametype a coop multiplayer game?

IsMultiplayerGame

simulated function bool IsMultiplayerGame ()

Is the current gametype a multiplayer game?

OnDestroyOnlineGameComplete

function OnDestroyOnlineGameComplete (bool bWasSuccessful)


PreventPause

simulated function bool PreventPause ()

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

RemovePRI

simulated function RemovePRI (PlayerReplicationInfo PRI)


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

SortPRIArray

simulated function SortPRIArray ()


StartMatch

simulated function StartMatch ()

Called on the server when the match has begin

Network - Server and Client (Via ReplicatedEvent)