Gah - a solution with more questions. – EntropicLqd
Difference between revisions of "UE3:GameReplicationInfo (UT3)"
m (added native code snippet posted by Steve Polge) |
m (updaterd for v1.3beta4) |
||
Line 6: | Line 6: | ||
| parent4 = Object | | parent4 = Object | ||
}} | }} | ||
− | + | 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 {{cl|GameInfo}} is not replicated). | ||
==Properties== | ==Properties== | ||
Line 112: | Line 116: | ||
'''Type:''' [[class]]<{{cl|GameInfo}}> | '''Type:''' [[class]]<{{cl|GameInfo}}> | ||
− | Class of the server's gameinfo, assigned by GameInfo. | + | Class of the server's gameinfo, assigned by {{cl|GameInfo}}. |
====GoalScore==== | ====GoalScore==== | ||
Line 124: | Line 128: | ||
'''Type:''' [[array]]<{{cl|PlayerReplicationInfo}}> | '''Type:''' [[array]]<{{cl|PlayerReplicationInfo}}> | ||
− | This list | + | This list mirrors the {{cl|GameInfo}}'s list of inactive PRI objects |
====MatchID==== | ====MatchID==== | ||
Line 141: | Line 145: | ||
'''Type:''' [[array]]<{{cl|PlayerReplicationInfo}}> | '''Type:''' [[array]]<{{cl|PlayerReplicationInfo}}> | ||
− | + | Array of all PlayerReplicationInfos, maintained on both server and clients (PRIs are always relevant) | |
====RemainingMinute==== | ====RemainingMinute==== | ||
Line 348: | Line 352: | ||
Is the current gametype a multiplayer game? | Is the current gametype a multiplayer game? | ||
+ | |||
+ | ====OnDestroyOnlineGameComplete==== | ||
+ | {{code|function '''OnDestroyOnlineGameComplete''' ([[bool]] '''bWasSuccessful''')}} | ||
+ | |||
+ | <!-- enter function description --> | ||
====PreventPause==== | ====PreventPause==== |
Latest revision as of 00:56, 26 July 2008
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[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]
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]
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]
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]
Overrides: Actor.Destroyed
Called when this actor is destroyed
OnlineSession_EndMatch[edit]
Signal that this match is over.
NETWORK - Both Client and Server
OnlineSession_EndSession[edit]
Signal that this session is over. Called natively
NETWORK - Both Client and Server
OnlineSession_StartMatch[edit]
Signal that this match has begun
NETWORK - Both Client and Server
PostBeginPlay[edit]
Overrides: Actor.PostBeginPlay
ReplicatedEvent[edit]
Overrides: Actor.ReplicatedEvent
Reset[edit]
Overrides: Actor.Reset
Timer[edit]
Overrides: Actor.Timer
Other instance functions[edit]
AddPRI[edit]
CleanupGameDataStore[edit]
Unregisters the data store for the current game session.
EndGame[edit]
Called on the server when the match is over
Network - Server and Client (Via ReplicatedEvent)
FindPlayerByID[edit]
GetOnlineGameInterface[edit]
Returns:
- a reference to the OnlineGameInterface if one exists. Network: Client and Server
GetPRIArray[edit]
InitializeGameDataStore[edit]
Creates and registers a data store for the current game session.
InOrder[edit]
returns true if P1 should be sorted before P2
IsCoopMultiplayerGame[edit]
Is the current gametype a coop multiplayer game?
IsMultiplayerGame[edit]
Is the current gametype a multiplayer game?
OnDestroyOnlineGameComplete[edit]
PreventPause[edit]
hook to allow the GRI to prevent pausing; used when it's performing asynch tasks that must be completed
RemovePRI[edit]
SetTeam[edit]
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]
StartMatch[edit]
Called on the server when the match has begin
Network - Server and Client (Via ReplicatedEvent)