Main replication API.
More...
◆ BumpMe()
static proto void Replication.BumpMe |
( |
| ) |
|
|
static |
Notifies replication systems about changes in your object and queues him for replication in near future.
◆ FindId()
Looks for RplId assigned by the Replication layer.
- Warning
- It is a lookup! Don't use in tight loops!
- Returns
- id or INVALID_ID if entity is not part of the replication process.
◆ FindItem()
Looks for Item of the provided id.
- Returns
- Item or null when no item with provided id exists.
◆ FindOwner()
Tries to look for the owner of provided replication id.
When successful returns its identity. Failure returns INVALID_ID constant.
◆ GetConnectionStats()
Retrieve snapshot of connection statistics for given identity
at current moment in time.
This snapshot is not updated over time. To always get up-to-date statistics, call this function repeatedly. Rate of updates of internal statistics is not well defined, but it can be expected to happen about once every two seconds (usually more often). Note that only server is able to access connection information of all clients connected to it.
When identity
is identifier of a real connection (such as from client to server), these will be statistics for that connection.
When identity
is RplIdentity.Local(), returned statistics are for local player. Local player on server does not suffer from any connection quality issues and statistics will report perfect values (such as zero round-trip time). Local player on client reports statistics from its real connection to the server (as if identity
was identifier of that connection).
When identity
is RplIdentity.Invalid() or it refers to non-existent connection, null
is returned.
- Parameters
-
[in] | identity | Identifier of queried connection. |
- Returns
- Statistics of a given connection, or
null
when identity
is wrong.
◆ IsClient()
static proto bool Replication.IsClient |
( |
| ) |
|
|
static |
- Warning
- Using the hardcoded IsClient will result in code thats not modular and won't adapt when running in different environment consider using the replication roles and ownership instead.
◆ IsRunning()
static proto bool Replication.IsRunning |
( |
| ) |
|
|
static |
Tells whenever the replication is active.
◆ IsServer()
static proto bool Replication.IsServer |
( |
| ) |
|
|
static |
- Warning
- Using the hardcoded IsServer will result in code thats not modular and won't adapt when running in different environment consider using the replication roles and ownership instead.
◆ Loadtime()
static proto bool Replication.Loadtime |
( |
| ) |
|
|
static |
The replication is currently in state of world loading.
The inserted nodes will receive a loadtime IDs and have to be spawned/present on both (Server and Client).
◆ Runtime()
static proto bool Replication.Runtime |
( |
| ) |
|
|
static |
The replication is currently in runtime mode.
The inserted nodes will receive a runtime IDs they will be automatically replicated to relevant clients.
◆ SetNumVirtualConnections()
static proto void Replication.SetNumVirtualConnections |
( |
int |
num | ) |
|
|
static |
Sets the number of virtual connections which are just generating load for the master.
- Warning
- INTERNAL PROFILING FEATURE ONLY!
◆ INVALID_ID
const RplId Replication.INVALID_ID = 0xFFFFFFFF |
|
static |
◆ INVALID_IDENTITY
const RplIdentity Replication.INVALID_IDENTITY = 0xFFFFFFFF |
|
static |
The documentation for this interface was generated from the following file:
- Core/generated/Replication/Replication.c