Nebula
Protocol

OwnerStateMsg

Authoritative post-simulation state of a predicted entity, for its owner's reconciliation.

generated from the sources
public struct OwnerStateMsg

Authoritative post-simulation state of a predicted entity, for its owner's reconciliation. Sent every tick, whether or not the owner's input for that tick had arrived, so the owner always has something to reconcile against and learns how early its inputs are landing (InputLead).

Fields

NetId

public ulong NetId;

Epoch

public uint Epoch;

Tick

public uint Tick;

The tick this state is the result of.

LastInputTick

public uint LastInputTick;

Tick of the newest real (not repeated) input the worker has simulated.

InputLead

public sbyte InputLead;

Worst (smallest) lead of the owner's inputs since the previous report: frame tick minus the worker's tick when the frame arrived. Inputs need a lead of at least 1 to be simulated; NoInputLead when nothing arrived.

OwnerClientId

public ulong OwnerClientId;

Container

public ContainerRef Container;

The container the state's pose is expressed in, so the owner reconciles in the right frame on the tick it crosses a seam.

State

public byte[] State;

Events

public byte[] Events;

Server events (PredictedBehaviourBase.PostServerEvent<TEvent>) that apply on ticks this report knows of, in PredictedBehaviourBase's own encoding; null or empty when there are none. Written after State, only when there are some, and only to a client of protocol HelloMsg.ServerEventsVersion or newer.

NoInputLead

public const sbyte NoInputLead = sbyte.MinValue;

Methods

Write

public void Write(NetworkWriter w);
public void Write(NetworkWriter w, bool includeEvents);

Write the message; includeEvents false leaves out the trailing Events section (a client that does not read it).

Read

public static OwnerStateMsg Read(NetworkReader r);

On this page