I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE3:GameReplicationInfo (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 01: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[edit]

Property group 'GameReplicationInfo'[edit]

AdminEmail[edit]

Type: string

Modifiers: databinding, globalconfig

Email address of the server admin.

AdminName[edit]

Type: string

Modifiers: databinding, globalconfig

Name of the server admin.

MessageOfTheDay[edit]

Type: string

Modifiers: databinding, globalconfig


Default value: "Welcome to a UT3 Server!"

ServerName[edit]

Type: string

Modifiers: databinding, globalconfig

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

ServerRegion[edit]

Type: int

Modifiers: databinding, globalconfig

Region of the game server.

ShortName[edit]

Type: string

Modifiers: databinding, globalconfig

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

Default value: "UT3 Server"

Internal variables[edit]

bIsArbitrated[edit]

Type: bool

Used to determine who handles session ending

bMatchHasBegun[edit]

Type: bool

Modifiers: repnotify


bMatchIsOver[edit]

Type: bool

Modifiers: repnotify


bNeedsOnlineCleanup[edit]

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[edit]

Type: bool


Default value: True

bTrackStats[edit]

Type: bool


CurrentGameData[edit]

Type: CurrentGameDataStore

Modifiers: private

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

ElapsedTime[edit]

Type: int

Modifiers: databinding


GameClass[edit]

Type: class<GameInfo>

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

GoalScore[edit]

Type: int

Modifiers: databinding


InactivePRIArray[edit]

Type: array<PlayerReplicationInfo>

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

MatchID[edit]

Type: int


MaxLives[edit]

Type: int

Modifiers: databinding


PRIArray[edit]

Type: array<PlayerReplicationInfo>

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

RemainingMinute[edit]

Type: int

Modifiers: databinding


RemainingTime[edit]

Type: int

Modifiers: databinding


SecondCount[edit]

Type: float

Modifiers: databinding


Teams[edit]

Type: array<TeamInfo>

Modifiers: databinding


TimeLimit[edit]

Type: int

Modifiers: databinding


Winner[edit]

Type: Actor

Modifiers: databinding

set by gameinfo when game ends

Default values[edit]

Property Value
TickGroup TG_DuringAsyncWork

Functions[edit]

Native functions[edit]

OnSameTeam[edit]

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[edit]

Destroyed[edit]

simulated event Destroyed ()

Overrides: Actor.Destroyed

Called when this actor is destroyed

OnlineSession_EndMatch[edit]

simulated event OnlineSession_EndMatch ()

Signal that this match is over.

NETWORK - Both Client and Server

OnlineSession_EndSession[edit]

simulated event OnlineSession_EndSession (bool bForced)

Signal that this session is over. Called natively

NETWORK - Both Client and Server

OnlineSession_StartMatch[edit]

simulated event OnlineSession_StartMatch ()

Signal that this match has begun

NETWORK - Both Client and Server

PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


ReplicatedEvent[edit]

simulated event ReplicatedEvent (name VarName)

Overrides: Actor.ReplicatedEvent


Reset[edit]

event Reset ()

Overrides: Actor.Reset


Timer[edit]

simulated event Timer ()

Overrides: Actor.Timer


Other instance functions[edit]

AddPRI[edit]

simulated function AddPRI (PlayerReplicationInfo PRI)


CleanupGameDataStore[edit]

simulated function CleanupGameDataStore ()

Unregisters the data store for the current game session.

EndGame[edit]

simulated function EndGame ()

Called on the server when the match is over

Network - Server and Client (Via ReplicatedEvent)

FindPlayerByID[edit]

simulated function PlayerReplicationInfo FindPlayerByID (int PlayerID)


GetOnlineGameInterface[edit]

simulated function OnlineGameInterface GetOnlineGameInterface ()

Returns:

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

GetPRIArray[edit]

simulated function GetPRIArray (out array<PlayerReplicationInfopris)


InitializeGameDataStore[edit]

simulated function InitializeGameDataStore ()

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

InOrder[edit]

simulated function bool InOrder (PlayerReplicationInfo P1, PlayerReplicationInfo P2)

returns true if P1 should be sorted before P2

IsCoopMultiplayerGame[edit]

simulated function bool IsCoopMultiplayerGame ()

Is the current gametype a coop multiplayer game?

IsMultiplayerGame[edit]

simulated function bool IsMultiplayerGame ()

Is the current gametype a multiplayer game?

OnDestroyOnlineGameComplete[edit]

function OnDestroyOnlineGameComplete (bool bWasSuccessful)


PreventPause[edit]

simulated function bool PreventPause ()

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

RemovePRI[edit]

simulated function RemovePRI (PlayerReplicationInfo PRI)


SetTeam[edit]

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[edit]

simulated function SortPRIArray ()


StartMatch[edit]

simulated function StartMatch ()

Called on the server when the match has begin

Network - Server and Client (Via ReplicatedEvent)