Space Engineers
|
Property sync state group. Synchronizes Sync members in SyncType. More...
Public Member Functions | |
delegate float | PriorityAdjustDelegate (int frameCountWithoutSync, MyClientStateBase clientState, float basePriority) |
MyPropertySyncStateGroup (IMyReplicable ownerReplicable, SyncType syncType) | |
void | MarkDirty () |
Marks dirty for all clients. More... | |
void | CreateClientData (MyClientStateBase forClient) |
Called on server new clients starts replicating this group. More... | |
void | DestroyClientData (MyClientStateBase forClient) |
Called on server when client stops replicating this group. More... | |
void | ClientUpdate (uint timestamp) |
void | Destroy () |
Called when state group is being destroyed. More... | |
virtual float | GetGroupPriority (int frameCountWithoutSync, MyClientInfo client) |
Gets group priority, when overloaded it can be useful to scale base priority. More... | |
bool | Serialize (BitStream stream, EndpointId forClient, uint timestamp, byte packetId, int maxBitPosition) |
void | OnAck (MyClientStateBase forClient, byte packetId, bool delivered) |
Called for each packet id sent to client from this state group. When ACK received, called immediatelly. When several other packets received from client, but some were missing, called for each missing packet. More... | |
void | ForceSend (MyClientStateBase clientData) |
Public Member Functions inherited from VRage.Network.IMyStateGroup | |
void | ClientUpdate (MyTimeSpan clientTimestamp) |
Update method called on client. More... | |
void | Serialize (BitStream stream, EndpointId forClient, MyTimeSpan timestamp, byte packetId, int maxBitPosition) |
(De)serializes group state or it's diff for client. When writing, you can write beyond maxBitPosition, but message won't be sent and ACKs won't be received for it. ReplicationServer will detect, that state group written beyond packet size and revert it. When nothing written, ReplicationServer will detect that and state group won't receive ACK for that packet id. More... | |
void | TimestampReset (MyTimeSpan timestamp) |
bool | IsStillDirty (EndpointId forClient) |
Public Attributes | |
readonly IMyReplicable | Owner |
Func< MyEventContext, bool > | GlobalValidate = (context) => true |
PriorityAdjustDelegate | PriorityAdjust = (frames, state, priority) => priority |
Properties | |
int | PropertyCount [get] |
StateGroupEnum | GroupType [get] |
Properties inherited from VRage.Network.IMyStateGroup | |
StateGroupEnum | GroupType [get] |
IMyReplicable | Owner [get] |
Property sync state group. Synchronizes Sync members in SyncType.
Definition at line 30 of file MyPropertySyncStateGroup.cs.
|
inline |
Definition at line 59 of file MyPropertySyncStateGroup.cs.
|
inline |
Definition at line 103 of file MyPropertySyncStateGroup.cs.
|
inline |
Called on server new clients starts replicating this group.
Implements VRage.Network.IMyStateGroup.
Definition at line 92 of file MyPropertySyncStateGroup.cs.
|
inline |
Called when state group is being destroyed.
Implements VRage.Network.IMyStateGroup.
Definition at line 122 of file MyPropertySyncStateGroup.cs.
|
inline |
Called on server when client stops replicating this group.
Implements VRage.Network.IMyStateGroup.
Definition at line 98 of file MyPropertySyncStateGroup.cs.
|
inline |
Implements VRage.Network.IMyStateGroup.
Definition at line 220 of file MyPropertySyncStateGroup.cs.
|
inlinevirtual |
Gets group priority, when overloaded it can be useful to scale base priority.
Implements VRage.Network.IMyStateGroup.
Definition at line 147 of file MyPropertySyncStateGroup.cs.
|
inline |
Marks dirty for all clients.
Definition at line 84 of file MyPropertySyncStateGroup.cs.
|
inline |
Called for each packet id sent to client from this state group. When ACK received, called immediatelly. When several other packets received from client, but some were missing, called for each missing packet.
forClient | The client. |
packetId | Id of the delivered or lost packet. |
delivered | True when packet was delivered, false when packet is considered lost. |
Implements VRage.Network.IMyStateGroup.
Definition at line 203 of file MyPropertySyncStateGroup.cs.
delegate float Sandbox.Game.Replication.MyPropertySyncStateGroup.PriorityAdjustDelegate | ( | int | frameCountWithoutSync, |
MyClientStateBase | clientState, | ||
float | basePriority | ||
) |
|
inline |
Definition at line 169 of file MyPropertySyncStateGroup.cs.
Func<MyEventContext, bool> Sandbox.Game.Replication.MyPropertySyncStateGroup.GlobalValidate = (context) => true |
Definition at line 53 of file MyPropertySyncStateGroup.cs.
readonly IMyReplicable Sandbox.Game.Replication.MyPropertySyncStateGroup.Owner |
Definition at line 52 of file MyPropertySyncStateGroup.cs.
PriorityAdjustDelegate Sandbox.Game.Replication.MyPropertySyncStateGroup.PriorityAdjust = (frames, state, priority) => priority |
Definition at line 54 of file MyPropertySyncStateGroup.cs.
|
get |
Definition at line 57 of file MyPropertySyncStateGroup.cs.
|
get |
Definition at line 56 of file MyPropertySyncStateGroup.cs.