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()
◆ FindItem()
Looks for item using provided item ID.
- Returns
- Item or null when item with provided item ID does not exist or cannot be used in script.
◆ FindItemId()
Looks for item ID assigned by the Replication to given item.
- Warning
- This function performs lookup! Don't use in tight loops!
- Returns
- Item ID or RplId.Invalid() if given item is not inserted in Replication.
◆ FindNode()
Looks for node among whose items is one identified by provided item ID.
- Returns
- Node or null when item with provided item ID does not exist.
◆ FindOwner()
Tries to look for the owner of provided item ID.
- Returns
- Identity of owner, or RplIdentity.Invalid() when current owner cannot be identified through RplIdentity (eg. because this instance does not have connection to them).
◆ 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