The client representation in the Quantum server plugin. More...
Public Member Functions | |
bool | HasPlayerSlot (Int32 playerIndex) |
Check if the client has the player index assigned. More... | |
Public Attributes | |
Boolean | Active => Joined && WaitingForSnapshot == false && DisconnectTime.HasValue == false |
Client has joined, is not waiting for snapshots (anymore) and has not been disconnected. More... | |
Int32 | ActorNr |
The Photon Realtime client index (Actor) is assigned by the server after the client has joined a room. The room is always ActorNr 0 and client the client numbering start with 1. The server always increments the number over the lifetime of the room. Clients that successfully RejoinAndReconnect() will receive the same ActorNr. More... | |
String | ClientId |
Client id is a secret between the client and the server. The client creates this id and other clients do not know this id. It is used to match reconnecting player so they receive the same player index. More... | |
String | DisconnectMessage |
The disconnect reason set from the server when disconnecting this client Photon.Deterministic.Server.ErrorStrings. More... | |
Double? | DisconnectTime |
Will be set to DeterministicPluginSession.GetTimerSeconds() + 1 when disconnecting the player. This is also marks the client as disconnected in a few places. More... | |
Boolean | Joined => ClientId != null |
Has the player sent the join message and has it been processed and a ClientId was set. More... | |
ulong | PlayerSlots |
The assigned player indicies (can be multiple if one client joines with more than one player slot in Photon.Deterministic.Protocol.Join) are masked into the unsigned long. Can be zero when the client is in spectating mode (Quantum 2.1). More... | |
int[] | PlayerSlotsArray |
The assigned player indicies (like in PlayerSlots) in an array form. More... | |
Queue< Protocol.Message > | ProtocolSendQueue |
Enqueue protocol messages which are sent to the client. More... | |
Int32 | Rtt |
Last received round trip time for this client by Photon.Deterministic.Protocol.RttUpdate. More... | |
Boolean | Spectator => Joined && PlayerSlots == 0 |
Is the client a spectator. Spectators have no player slots and can not send any input or commands. More... | |
Object | UserToken |
Attach any data you want to the client. For example something you want to cache while waiting for a HTTP response. More... | |
Boolean | WaitingForSnapshot |
This client is connected but is waiting for a snapshot to be send by either other clients or the server. More... | |
Int32 | WaitingForSnapshotTimeoutTick |
The tick when waiting for snapshots will time out and the client will be disconnected. More... | |
The client representation in the Quantum server plugin.
|
inline |
Check if the client has the player index assigned.
playerIndex | Player index |
Int32 Photon.Deterministic.Server.DeterministicPluginClient.Rtt |
Last received round trip time for this client by Photon.Deterministic.Protocol.RttUpdate.
Int32 Photon.Deterministic.Server.DeterministicPluginClient.ActorNr |
The Photon Realtime client index (Actor) is assigned by the server after the client has joined a room. The room is always ActorNr 0 and client the client numbering start with 1. The server always increments the number over the lifetime of the room. Clients that successfully RejoinAndReconnect() will receive the same ActorNr.
Boolean Photon.Deterministic.Server.DeterministicPluginClient.WaitingForSnapshot |
This client is connected but is waiting for a snapshot to be send by either other clients or the server.
Int32 Photon.Deterministic.Server.DeterministicPluginClient.WaitingForSnapshotTimeoutTick |
The tick when waiting for snapshots will time out and the client will be disconnected.
Object Photon.Deterministic.Server.DeterministicPluginClient.UserToken |
Attach any data you want to the client. For example something you want to cache while waiting for a HTTP response.
Double? Photon.Deterministic.Server.DeterministicPluginClient.DisconnectTime |
Will be set to DeterministicPluginSession.GetTimerSeconds() + 1 when disconnecting the player. This is also marks the client as disconnected in a few places.
String Photon.Deterministic.Server.DeterministicPluginClient.DisconnectMessage |
The disconnect reason set from the server when disconnecting this client Photon.Deterministic.Server.ErrorStrings.
String Photon.Deterministic.Server.DeterministicPluginClient.ClientId |
Client id is a secret between the client and the server. The client creates this id and other clients do not know this id. It is used to match reconnecting player so they receive the same player index.
ulong Photon.Deterministic.Server.DeterministicPluginClient.PlayerSlots |
The assigned player indicies (can be multiple if one client joines with more than one player slot in Photon.Deterministic.Protocol.Join) are masked into the unsigned long. Can be zero when the client is in spectating mode (Quantum 2.1).
int [] Photon.Deterministic.Server.DeterministicPluginClient.PlayerSlotsArray |
The assigned player indicies (like in PlayerSlots) in an array form.
Queue<Protocol.Message> Photon.Deterministic.Server.DeterministicPluginClient.ProtocolSendQueue |
Enqueue protocol messages which are sent to the client.
Boolean Photon.Deterministic.Server.DeterministicPluginClient.Joined => ClientId != null |
Has the player sent the join message and has it been processed and a ClientId was set.
Boolean Photon.Deterministic.Server.DeterministicPluginClient.Active => Joined && WaitingForSnapshot == false && DisconnectTime.HasValue == false |
Client has joined, is not waiting for snapshots (anymore) and has not been disconnected.
Boolean Photon.Deterministic.Server.DeterministicPluginClient.Spectator => Joined && PlayerSlots == 0 |
Is the client a spectator. Spectators have no player slots and can not send any input or commands.