I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX
UE3:GameReplicationInfo (UT3)
Object >> Actor >> Info >> ReplicationInfo >> GameReplicationInfo |
Contents
- 1 Properties
- 1.1 Property group 'GameReplicationInfo'
- 1.2 Internal variables
- 1.2.1 bIsArbitrated
- 1.2.2 bMatchHasBegun
- 1.2.3 bMatchIsOver
- 1.2.4 bNeedsOnlineCleanup
- 1.2.5 bStopCountDown
- 1.2.6 bTrackStats
- 1.2.7 CurrentGameData
- 1.2.8 ElapsedTime
- 1.2.9 GameClass
- 1.2.10 GoalScore
- 1.2.11 InactivePRIArray
- 1.2.12 MatchID
- 1.2.13 MaxLives
- 1.2.14 PRIArray
- 1.2.15 RemainingMinute
- 1.2.16 RemainingTime
- 1.2.17 SecondCount
- 1.2.18 Teams
- 1.2.19 TimeLimit
- 1.2.20 Winner
- 1.3 Default values
- 2 Functions
- 2.1 Native functions
- 2.2 Events
- 2.3 Other instance functions
- 2.3.1 AddPRI
- 2.3.2 CleanupGameDataStore
- 2.3.3 EndGame
- 2.3.4 FindPlayerByID
- 2.3.5 GetOnlineGameInterface
- 2.3.6 GetPRIArray
- 2.3.7 InitializeGameDataStore
- 2.3.8 InOrder
- 2.3.9 IsCoopMultiplayerGame
- 2.3.10 IsMultiplayerGame
- 2.3.11 OnDestroyOnlineGameComplete
- 2.3.12 PreventPause
- 2.3.13 RemovePRI
- 2.3.14 SetTeam
- 2.3.15 SortPRIArray
- 2.3.16 StartMatch
- 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
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
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
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
Overrides: Actor.Destroyed
Called when this actor is destroyed
OnlineSession_EndMatch
Signal that this match is over.
NETWORK - Both Client and Server
OnlineSession_EndSession
Signal that this session is over. Called natively
NETWORK - Both Client and Server
OnlineSession_StartMatch
Signal that this match has begun
NETWORK - Both Client and Server
PostBeginPlay
Overrides: Actor.PostBeginPlay
ReplicatedEvent
Overrides: Actor.ReplicatedEvent
Reset
Overrides: Actor.Reset
Timer
Overrides: Actor.Timer
Other instance functions
AddPRI
CleanupGameDataStore
Unregisters the data store for the current game session.
EndGame
Called on the server when the match is over
Network - Server and Client (Via ReplicatedEvent)
FindPlayerByID
GetOnlineGameInterface
Returns:
- a reference to the OnlineGameInterface if one exists. Network: Client and Server
GetPRIArray
InitializeGameDataStore
Creates and registers a data store for the current game session.
InOrder
returns true if P1 should be sorted before P2
IsCoopMultiplayerGame
Is the current gametype a coop multiplayer game?
IsMultiplayerGame
Is the current gametype a multiplayer game?
OnDestroyOnlineGameComplete
PreventPause
hook to allow the GRI to prevent pausing; used when it's performing asynch tasks that must be completed
RemovePRI
SetTeam
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
StartMatch
Called on the server when the match has begin
Network - Server and Client (Via ReplicatedEvent)