Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

UE3:PlayerReplicationInfo (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
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

AutomatedTestingData

Type: AutomatedTestingDatum


bAdmin

Type: bool

Player logged in as Administrator

bBot

Type: bool

True if this PRI is associated with an AIController

bFromPreviousLevel

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

Type: bool

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

bHasFlag

Type: bool

Whether this PRI is holding special game object.

bIsFemale

Type: bool

True if player is female

bIsInactive

Type: bool

Modifiers: repnotify

Means this PRI came from the GameInfo's InactivePRIArray

bIsSpectator

Type: bool

Whether this player is currently a spectator

bOnlySpectator

Type: bool

Whether this player can only ever be a spectator

bOutOfLives

Type: bool

Can't respawn once out of lives

bReadyToPlay

Type: bool

Whether this player has confirmed ready to play

bWaitingPlayer

Type: bool

Whether this player is waiting to enter match

Deaths

Type: int

Modifiers: databinding

Number of player's deaths.

ExactPing

Type: float

Exact ping as float (rounded and compressed in Ping)

GameMessageClass

Type: class<GameMessage>

Message class to use for PRI originated localized messages

Default value: Class'Engine.GameMessage'

Kills

Type: int

Modifiers: databinding

Kills by this player. Not replicated.

NumLives

Type: int

Number of lives used by this player

OldName

Type: string

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

Ping

Type: byte

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

PlayerID

Type: int

Unique id number.

PlayerLocationHint

Type: Actor

Actor providing hint as to associated player's current location

PlayerName

Type: string

Modifiers: databinding, repnotify

Player name, or blank if none.

SavedNetworkAddress

Type: string

Used to match up InactivePRI with rejoining playercontroller.

Score

Type: float

Modifiers: repnotify, databinding

Player's current score.

SessionName

Type: name

Modifiers: const

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

Default value: 'Game'

SplitscreenIndex

Type: int

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

Default value: -1

StartTime

Type: int

Elapsed time on server when this PRI was first created.

StatAvgInBPS

Type: int


StatAvgOutBPS

Type: int


StatConnectionCounts

Type: int

Used for Averages;

StatMaxInBPS

Type: int


StatMaxOutBPS

Type: int


StatPingMax

Type: int


StatPingMin

Type: int


StatPingTotals

Type: int


StatPKLMax

Type: int


StatPKLMin

Type: int


StatPKLTotal

Type: int


StringSpectating

Type: string

Modifiers: localized

Used for reporting player location

Default value: "Spectating"

StringUnknown

Type: string

Modifiers: localized


Default value: "Unknown"

Team

Type: TeamInfo

Modifiers: repnotify

Player team

TTSSpeaker

Type: AudioDevice.ETTSSpeaker

Modifiers: transient

Voice to use for TTS

UniqueId

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

Property Value
NetUpdateFrequency 1.0
TickGroup TG_DuringAsyncWork

Structs

AutomatedTestingDatum

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

Native functions

AreUniqueNetIdsEqual

native final function bool AreUniqueNetIdsEqual (PlayerReplicationInfo OtherPRI)


GetPlayerAlias

native function string GetPlayerAlias ()

Returns PlayerName. deprecated.

GetTeamNum

simulated native function byte GetTeamNum ()

Overrides: Actor.GetTeamNum


UpdatePing

final native function UpdatePing (float TimeStamp)


Events

Destroyed

simulated event Destroyed ()

Overrides: Actor.Destroyed


PostBeginPlay

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


ReplicatedDataBinding

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

simulated event ReplicatedEvent (name VarName)

Overrides: Actor.ReplicatedEvent


Reset

event Reset ()

Overrides: Actor.Reset


SetPlayerName

event SetPlayerName (string S)


Timer

event Timer ()

Overrides: Actor.Timer


Other instance functions

BindPlayerOwnerDataProvider

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

simulated function ClientInitialize (Controller C)


CopyProperties

function CopyProperties (PlayerReplicationInfo PRI)


DisplayDebug

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

function PlayerReplicationInfo Duplicate ()


GetCurrentGameDS

simulated function CurrentGameDataStore GetCurrentGameDS ()

Returns:

a reference to the CurrentGame data store

GetHumanReadableName

simulated function string GetHumanReadableName ()

Overrides: Actor.GetHumanReadableName


GetLocationName

simulated function string GetLocationName ()


IncrementDeaths

function IncrementDeaths (optional int Amt)


IsInvalidName

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

simulated function bool IsLocalPlayerPRI ()

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

NotifyLocalPlayerTeamReceived

simulated function NotifyLocalPlayerTeamReceived ()

Overrides: Actor.NotifyLocalPlayerTeamReceived

Routes the team change notification to the CurrentGame data store.

OverrideWith

function OverrideWith (PlayerReplicationInfo PRI)


RegisterPlayerWithSession

simulated function RegisterPlayerWithSession ()

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

SeamlessTravelTo

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

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

function SetPlayerTeam (TeamInfo NewTeam)


SetSplitscreenIndex

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

simulated function SetUniqueId (OnlineSubsystem.UniqueNetId PlayerUniqueId)

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

SetWaitingPlayer

function SetWaitingPlayer (bool B)


ShouldBroadCastWelcomeMessage

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

simulated function UnregisterPlayerFromSession ()

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

UpdatePlayerDataProvider

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

function UpdatePlayerLocation ()


UpdateTeamDataProvider

simulated function UpdateTeamDataProvider ()

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