Space Engineers
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup Class Reference

Responsible for synchronizing entity physics over network More...

Inheritance diagram for Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup:
Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup VRage.Network.IMyStateGroup VRage.Network.IMyNetObject VRage.Network.IMyEventOwner

Public Member Functions

 MyCharacterPhysicsStateGroup (MyEntity entity, IMyReplicable ownerReplicable)
 
override void ClientUpdate (MyTimeSpan clientTimestamp)
 Update method called on client. More...
 
override 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...
 
- Public Member Functions inherited from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup
 MyEntityPhysicsStateGroup (MyEntity entity, IMyReplicable ownerReplicable)
 
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 Destroy ()
 Called when state group is being destroyed. More...
 
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)
 
void TimestampReset (MyTimeSpan timestamp)
 
bool IsStillDirty (EndpointId forClient)
 

Static Public Member Functions

static void ReadAndSkipCharacterState (BitStream stream)
 
- Static Public Member Functions inherited from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup
static bool ResponsibleForUpdate (MyEntity entity, EndpointId endpointId)
 

Protected Member Functions

override bool IsMoving (MyEntity entity)
 
override float GetGroupPriority (int frameCountWithoutSync, MyClientInfo client, PrioritySettings settings)
 
- Protected Member Functions inherited from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup
float GetBasicPhysicsPriority (MyClientInfo client)
 Takes into account: Static body (zero priority for static), ResponsibilityForUpdate by client (zero priority for not responsible), otherwise returns OwnerReplicable priority. More...
 
float GetMovementScale (PrioritySettings prioritySettings, out float updateOncePer)
 Gets priority scale and update rate based on prioritySettings. More...
 
virtual float GetGroupPriority (int frameCountWithoutSync, MyClientInfo client, PrioritySettings settings)
 

Properties

new MyCharacter Entity [get]
 
bool IsAlwaysDirty [get]
 
- Properties inherited from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup
MyEntity Entity [get]
 
IMyReplicable Owner [get]
 
virtual StateGroupEnum GroupType [get]
 
bool IsControlledLocally [get]
 
bool IsAccelerating [get]
 
- Properties inherited from VRage.Network.IMyStateGroup
StateGroupEnum GroupType [get]
 
IMyReplicable Owner [get]
 

Additional Inherited Members

- Public Attributes inherited from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup
const int NUM_DECIMAL_PRECISION = 3
 
- Protected Attributes inherited from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup
readonly History.IMySnapshotSync SnapshotSync
 
readonly PrioritySettings m_prioritySettings = new PrioritySettings()
 
uint m_lastMovementFrame = 0
 
- Static Protected Attributes inherited from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup
static float PRECISION = 1 / (float)Math.Pow(10, NUM_DECIMAL_PRECISION)
 

Detailed Description

Responsible for synchronizing entity physics over network

Definition at line 16 of file MyCharacterPhysicsStateGroup.cs.

Constructor & Destructor Documentation

Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.MyCharacterPhysicsStateGroup ( MyEntity  entity,
IMyReplicable  ownerReplicable 
)
inline

Definition at line 50 of file MyCharacterPhysicsStateGroup.cs.

Member Function Documentation

override void Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.ClientUpdate ( MyTimeSpan  clientTimestamp)
inlinevirtual

Update method called on client.

Reimplemented from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup.

Definition at line 59 of file MyCharacterPhysicsStateGroup.cs.

override float Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.GetGroupPriority ( int  frameCountWithoutSync,
MyClientInfo  client,
PrioritySettings  settings 
)
inlineprotected

Definition at line 111 of file MyCharacterPhysicsStateGroup.cs.

override bool Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.IsMoving ( MyEntity  entity)
inlineprotectedvirtual
static void Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.ReadAndSkipCharacterState ( BitStream  stream)
inlinestatic

Definition at line 136 of file MyCharacterPhysicsStateGroup.cs.

override void Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.Serialize ( BitStream  stream,
EndpointId  forClient,
MyTimeSpan  timestamp,
byte  packetId,
int  maxBitPosition 
)
inlinevirtual

(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.

Parameters
streamStream to write to or read from.
forClientWhen writing the client which will receive the data. When reading, it's null.
packetIdId of packet in which the data will be sent or from which the data is received.
maxBitPositionMaximum position in bit stream where you can write data, it's inclusive.

Reimplemented from Sandbox.Game.Replication.StateGroups.MyEntityPhysicsStateGroup.

Definition at line 72 of file MyCharacterPhysicsStateGroup.cs.

Property Documentation

new MyCharacter Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.Entity
get

Definition at line 18 of file MyCharacterPhysicsStateGroup.cs.

bool Sandbox.Game.Replication.StateGroups.MyCharacterPhysicsStateGroup.IsAlwaysDirty
get

Definition at line 142 of file MyCharacterPhysicsStateGroup.cs.


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