Space Engineers
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup Class Referenceabstract
Inheritance diagram for Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup:
VRage.Network.IMyStateGroup VRage.Network.IMyNetObject VRage.Network.IMyEventOwner Sandbox.Game.Replication.MyCharacterPositionVerificationStateGroup Sandbox.Game.Replication.MyGridPositionVerificationStateGroup

Classes

struct  ClientData
 

Public Member Functions

virtual long GetSupportID ()
 
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...
 
virtual void ClientUpdate (uint timestamp)
 
void Destroy ()
 Called when state group is being destroyed. More...
 
float GetGroupPriority (int frameCountWithoutSync, MyClientInfo forClient)
 Gets priority related to client. When priority is lower than zero, it means the object is not relevant for client. Default priority is 1.0f. More...
 
bool Serialize (VRage.Library.Collections.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)
 
 MyEntityPositionVerificationStateGroup (MyEntity entity)
 
- 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)
 

Protected Member Functions

virtual void ClientWrite (VRage.Library.Collections.BitStream stream, EndpointId forClient, uint timestamp, int maxBitPosition)
 
virtual void ServerRead (VRage.Library.Collections.BitStream stream, ulong clientId, uint timestamp)
 
abstract void CalculatePositionDifference (ulong clientId, out bool positionValid, out bool correctServer, out Vector3D delta)
 
virtual void CustomServerWrite (uint timeStamp, ulong clientId, VRage.Library.Collections.BitStream stream)
 
virtual void CustomClientRead (uint timeStamp, ref MyTransformD serverPositionAndOrientation, VRage.Library.Collections.BitStream stream)
 
virtual bool IsPositionValid (MyTransformD clientPos)
 

Protected Attributes

MyEntity Entity
 
Dictionary< ulong, ClientDatam_serverClientData
 
MyTimestampHelper m_timestamp
 
uint m_currentTimeStamp = 0
 

Properties

StateGroupEnum GroupType [get]
 
- Properties inherited from VRage.Network.IMyStateGroup
StateGroupEnum GroupType [get]
 
IMyReplicable Owner [get]
 

Detailed Description

Definition at line 19 of file MyEntityPositionVerificationStateGroup.cs.

Constructor & Destructor Documentation

Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.MyEntityPositionVerificationStateGroup ( MyEntity  entity)
inline

Definition at line 317 of file MyEntityPositionVerificationStateGroup.cs.

Member Function Documentation

abstract void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.CalculatePositionDifference ( ulong  clientId,
out bool  positionValid,
out bool  correctServer,
out Vector3D  delta 
)
protectedpure virtual
virtual void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.ClientUpdate ( uint  timestamp)
inlinevirtual
virtual void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.ClientWrite ( VRage.Library.Collections.BitStream  stream,
EndpointId  forClient,
uint  timestamp,
int  maxBitPosition 
)
inlineprotectedvirtual
void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.CreateClientData ( MyClientStateBase  forClient)
inline

Called on server new clients starts replicating this group.

Implements VRage.Network.IMyStateGroup.

Definition at line 48 of file MyEntityPositionVerificationStateGroup.cs.

virtual void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.CustomClientRead ( uint  timeStamp,
ref MyTransformD  serverPositionAndOrientation,
VRage.Library.Collections.BitStream  stream 
)
inlineprotectedvirtual
virtual void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.CustomServerWrite ( uint  timeStamp,
ulong  clientId,
VRage.Library.Collections.BitStream  stream 
)
inlineprotectedvirtual
void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.Destroy ( )
inline

Called when state group is being destroyed.

Implements VRage.Network.IMyStateGroup.

Definition at line 95 of file MyEntityPositionVerificationStateGroup.cs.

void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.DestroyClientData ( MyClientStateBase  forClient)
inline

Called on server when client stops replicating this group.

Implements VRage.Network.IMyStateGroup.

Definition at line 62 of file MyEntityPositionVerificationStateGroup.cs.

void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.ForceSend ( MyClientStateBase  clientData)
inline
float Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.GetGroupPriority ( int  frameCountWithoutSync,
MyClientInfo  forClient 
)
inline

Gets priority related to client. When priority is lower than zero, it means the object is not relevant for client. Default priority is 1.0f.

Parameters
frameCountWithoutSyncHow long (in update frame count) has client not received sync of this state group.
forClientClient for whom is the priority get.

Implements VRage.Network.IMyStateGroup.

Definition at line 100 of file MyEntityPositionVerificationStateGroup.cs.

virtual long Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.GetSupportID ( )
inlinevirtual
virtual bool Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.IsPositionValid ( MyTransformD  clientPos)
inlineprotectedvirtual
void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.OnAck ( MyClientStateBase  forClient,
byte  packetId,
bool  delivered 
)
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.

Parameters
forClientThe client.
packetIdId of the delivered or lost packet.
deliveredTrue when packet was delivered, false when packet is considered lost.

Implements VRage.Network.IMyStateGroup.

Definition at line 307 of file MyEntityPositionVerificationStateGroup.cs.

bool Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.Serialize ( VRage.Library.Collections.BitStream  stream,
EndpointId  forClient,
uint  timestamp,
byte  packetId,
int  maxBitPosition 
)
inline

Definition at line 114 of file MyEntityPositionVerificationStateGroup.cs.

virtual void Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.ServerRead ( VRage.Library.Collections.BitStream  stream,
ulong  clientId,
uint  timestamp 
)
inlineprotectedvirtual

Member Data Documentation

MyEntity Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.Entity
protected

Definition at line 21 of file MyEntityPositionVerificationStateGroup.cs.

uint Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.m_currentTimeStamp = 0
protected

Definition at line 34 of file MyEntityPositionVerificationStateGroup.cs.

Dictionary<ulong, ClientData> Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.m_serverClientData
protected

Definition at line 29 of file MyEntityPositionVerificationStateGroup.cs.

MyTimestampHelper Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.m_timestamp
protected

Definition at line 32 of file MyEntityPositionVerificationStateGroup.cs.

Property Documentation

StateGroupEnum Sandbox.Game.Replication.MyEntityPositionVerificationStateGroup.GroupType
get

Definition at line 44 of file MyEntityPositionVerificationStateGroup.cs.


The documentation for this class was generated from the following file: