Table of Contents

Class TickPoser

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Poses every ITickPosed before each tick a character is simulated at: the live tick (TimeManager.OnPreTick), each tick a client replays (PredictionManager.OnPreReplicateReplay) and the live tick again after a reconcile (OnPostReconcile), each mapped to the server tick it runs at exactly as the ships are (FloatingBoats, WeatherExposureTick), then Physics.SyncTransforms once.

public static class TickPoser
Inheritance
TickPoser
Inherited Members

Remarks

Anything a predicted character collides with has to be where it was on the tick the character is simulated at, on the server, on the owner's live tick and on every tick the owner replays; otherwise the owner predicts against a world the server did not have and is corrected. Posing from a frame (Update, LateUpdate) does neither: a frame's idea of the tick is not the owner's tick, and a replay never rewinds it. One subscription per process, however many scenes and objects (a scene server hosts several scenes).

Methods

Add(ITickPosed)

Registers an object (OnEnable).

public static void Add(ITickPosed posed)

Parameters

posed ITickPosed

Ensure()

Subscribes to the network's tick if it has not yet (the network may start after the objects).

public static void Ensure()

Remove(ITickPosed)

Unregisters an object (OnDisable).

public static void Remove(ITickPosed posed)

Parameters

posed ITickPosed