I don't need to test my programs. I have an error-correcting modem.

UE3:PlayerReplicationInfo (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 12:47, 6 November 2009 by (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Actor >> Info >> ReplicationInfo >> PlayerReplicationInfo

Contents

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

PlayerReplicationInfo.

A PlayerReplicationInfo is created for every player on a server (or in a standalone game). Players are PlayerControllers, or other Controllers with bIsPlayer=true PlayerReplicationInfos are replicated to all clients, and contain network game relevant information about the player, such as playername, score, etc.

Properties[edit]

AutomatedTestingData[edit]

Type: AutomatedTestingDatum


bAdmin[edit]

Type: bool

Player logged in as Administrator

bBot[edit]

Type: bool

True if this PRI is associated with an AIController

bFromPreviousLevel[edit]

Type: bool

indicates this is a PRI from the previous level of a seamless travel, waiting for the player to finish the transition before creating a new one this is used to avoid preserving the PRI in the InactivePRIArray if the player leaves

bHasBeenWelcomed[edit]

Type: bool

client side flag - whether this player has been welcomed or not (player entered message)

bHasFlag[edit]

Type: bool

Whether this PRI is holding special game object.

bIsFemale[edit]

Type: bool

True if player is female

bIsInactive[edit]

Type: bool

Modifiers: repnotify

Means this PRI came from the GameInfo's InactivePRIArray

bIsSpectator[edit]

Type: bool

Whether this player is currently a spectator

bOnlySpectator[edit]

Type: bool

Whether this player can only ever be a spectator

bOutOfLives[edit]

Type: bool

Can't respawn once out of lives

bReadyToPlay[edit]

Type: bool

Whether this player has confirmed ready to play

bWaitingPlayer[edit]

Type: bool

Whether this player is waiting to enter match

Deaths[edit]

Type: int

Modifiers: databinding

Number of player's deaths.

ExactPing[edit]

Type: float

Exact ping as float (rounded and compressed in Ping)

GameMessageClass[edit]

Type: class<GameMessage>

Message class to use for PRI originated localized messages

Default value: Class'Engine.GameMessage'

Kills[edit]

Type: int

Modifiers: databinding

Kills by this player. Not replicated.

NumLives[edit]

Type: int

Number of lives used by this player

OldName[edit]

Type: string

Previous playername. Saved on client-side to detect playername changes.

Ping[edit]

Type: byte

Replicated compressed ping for this player (holds ping in msec divided by 4)

PlayerID[edit]

Type: int

Unique id number.

PlayerLocationHint[edit]

Type: Actor

Actor providing hint as to associated player's current location

PlayerName[edit]

Type: string

Modifiers: databinding, repnotify

Player name, or blank if none.

SavedNetworkAddress[edit]

Type: string

Used to match up InactivePRI with rejoining playercontroller.

Score[edit]

Type: float

Modifiers: repnotify, databinding

Player's current score.

SessionName[edit]

Type: name

Modifiers: const

The session that the player needs to join/remove from as it is created/leaves

Default value: 'Game'

SplitscreenIndex[edit]

Type: int

-1 if not a splitscreen player, index into that player's local GamePlayers array otherwise.

Default value: -1

StartTime[edit]

Type: int

Elapsed time on server when this PRI was first created.

StatAvgInBPS[edit]

Type: int


StatAvgOutBPS[edit]

Type: int


StatConnectionCounts[edit]

Type: int

Used for Averages;

StatMaxInBPS[edit]

Type: int


StatMaxOutBPS[edit]

Type: int


StatPingMax[edit]

Type: int


StatPingMin[edit]

Type: int


StatPingTotals[edit]

Type: int


StatPKLMax[edit]

Type: int


StatPKLMin[edit]

Type: int


StatPKLTotal[edit]

Type: int


StringSpectating[edit]

Type: string

Modifiers: localized

Used for reporting player location

Default value: "Spectating"

StringUnknown[edit]

Type: string

Modifiers: localized


Default value: "Unknown"

Team[edit]

Type: TeamInfo

Modifiers: repnotify

Player team

TTSSpeaker[edit]

Type: AudioDevice.ETTSSpeaker

Modifiers: transient

Voice to use for TTS

UniqueId[edit]

Type: OnlineSubsystem.UniqueNetId

Modifiers: databinding, repnotify

The id used by the network to uniquely identify a player. NOTE: this property should *never* be exposed to the player as it's transient and opaque in meaning (ie it might mean date/time followed by something else)

Default values[edit]

Property Value
NetUpdateFrequency 1.0
TickGroup TG_DuringAsyncWork

Structs[edit]

AutomatedTestingDatum[edit]

Modifiers: native

int NumberOfMatchesPlayed 
Number of matches played (maybe remove this before shipping) This is really useful for doing soak testing and such to see how long you lasted! NOTE: This is not replicated out to clients atm. *
int NumMapListCyclesDone 
Keeps track of the current run so when we have repeats and such we know how far along we are *

Functions[edit]

Native functions[edit]

AreUniqueNetIdsEqual[edit]

native final function bool AreUniqueNetIdsEqual (PlayerReplicationInfo OtherPRI)


GetPlayerAlias[edit]

native function string GetPlayerAlias ()

Returns PlayerName. deprecated.

GetTeamNum[edit]

simulated native function byte GetTeamNum ()

Overrides: Actor.GetTeamNum


UpdatePing[edit]

final native function UpdatePing (float TimeStamp)


Events[edit]

Destroyed[edit]

simulated event Destroyed ()

Overrides: Actor.Destroyed


PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


ReplicatedDataBinding[edit]

simulated event ReplicatedDataBinding (name VarName)

Overrides: Actor.ReplicatedDataBinding

Called when a variable is replicated that has the 'databinding' keyword.

Parameters:

  • VarName - the name of the variable that was replicated.

ReplicatedEvent[edit]

simulated event ReplicatedEvent (name VarName)

Overrides: Actor.ReplicatedEvent


Reset[edit]

event Reset ()

Overrides: Actor.Reset


SetPlayerName[edit]

event SetPlayerName (string S)


Timer[edit]

event Timer ()

Overrides: Actor.Timer


Other instance functions[edit]

BindPlayerOwnerDataProvider[edit]

simulated function BindPlayerOwnerDataProvider ()

Finds the PlayerDataProvider that was registered with the CurrentGame data store for this PRI and links it to the owning player's PlayerOwner data store.

ClientInitialize[edit]

simulated function ClientInitialize (Controller C)


CopyProperties[edit]

function CopyProperties (PlayerReplicationInfo PRI)


DisplayDebug[edit]

simulated function DisplayDebug (HUD HUD, out float YL, out float YPos)

Overrides: Actor.DisplayDebug

(Description copied from Actor.DisplayDebug)
list important Actor variables on canvas. HUD will call DisplayDebug() on the current ViewTarget when the ShowDebug exec is used

Parameters:

  • HUD - HUD with canvas to draw on
  • out_YL - Height of the current font
  • out_YPos - Y position on Canvas. out_YPos += out_YL, gives position to draw text for next debug line.

Duplicate[edit]

function PlayerReplicationInfo Duplicate ()


GetCurrentGameDS[edit]

simulated function CurrentGameDataStore GetCurrentGameDS ()

Returns:

a reference to the CurrentGame data store

GetHumanReadableName[edit]

simulated function string GetHumanReadableName ()

Overrides: Actor.GetHumanReadableName


GetLocationName[edit]

simulated function string GetLocationName ()


IncrementDeaths[edit]

function IncrementDeaths (optional int Amt)


IsInvalidName[edit]

simulated function bool IsInvalidName ()

Validates that the new name matches the profile if the player is logged in

Returns:

TRUE if the name doesn't match, FALSE otherwise

IsLocalPlayerPRI[edit]

simulated function bool IsLocalPlayerPRI ()

Utility for seeing if this PRI is for a locally controller player.

NotifyLocalPlayerTeamReceived[edit]

simulated function NotifyLocalPlayerTeamReceived ()

Overrides: Actor.NotifyLocalPlayerTeamReceived

Routes the team change notification to the CurrentGame data store.

OverrideWith[edit]

function OverrideWith (PlayerReplicationInfo PRI)


RegisterPlayerWithSession[edit]

simulated function RegisterPlayerWithSession ()

The base implementation registers the player with the online session so that recent players list and session counts are updated.

SeamlessTravelTo[edit]

function SeamlessTravelTo (PlayerReplicationInfo NewPRI)

called by seamless travel when initializing a player on the other side - copy properties to the new PRI that should persist

ServerSetSplitscreenIndex[edit]

reliable server function ServerSetSplitscreenIndex (byte PlayerIndex)

Set the value of SplitscreenIndex for this PRI on the server so it can be received by all clients.

Parameters:

  • PlayerIndex - the index [into the GamePlayers array] for the player that owns this PRI.

SetPlayerTeam[edit]

function SetPlayerTeam (TeamInfo NewTeam)


SetSplitscreenIndex[edit]

simulated function SetSplitscreenIndex (byte PlayerIndex)

Set the value of SplitscreenIndex for this PRI, then send that value to the server. Only called if the player is a splitscreen player.

Parameters:

  • PlayerIndex - the index [into the GamePlayers array] for the player that owns this PRI.

SetUniqueId[edit]

simulated function SetUniqueId (OnlineSubsystem.UniqueNetId PlayerUniqueId)

Sets the player's unique net id on the server.

SetWaitingPlayer[edit]

function SetWaitingPlayer (bool B)


ShouldBroadCastWelcomeMessage[edit]

simulated function bool ShouldBroadCastWelcomeMessage (optional bool bExiting)

Returns true if should broadcast player welcome/left messages. Current conditions: must be a human player a network game

UnregisterPlayerFromSession[edit]

simulated function UnregisterPlayerFromSession ()

The base implementation unregisters the player with the online session so that session counts are updated.

UpdatePlayerDataProvider[edit]

simulated function UpdatePlayerDataProvider (optional name PropertyName)

Notifies the PlayerDataProvider associated with this PlayerReplicationInfo that a property's value has changed.

Parameters:

  • PropertyName - the name of the property that was changed.

UpdatePlayerLocation[edit]

function UpdatePlayerLocation ()


UpdateTeamDataProvider[edit]

simulated function UpdateTeamDataProvider ()

Notifies the CurrentGame data store that this player's Team has changed.