public sealed class LagCompensationSystemFills the pose ring, once a tick, for every body that asked to be in it.
As a system
- Phase
- FixedUpdate
- Reads
- LagCompensated
- Runs before
- NetworkTransformCaptureSystem
- Runs after
- PhysicsWritebackSystem
Remarks
⚠ LagCompensator.Capture was never called in any process. The compensator, the ring, ClampFor and the rewind scope were all built and all correct, and the only file in the repository that constructed one was Vixen.Net.Physics.Tests/LagCompensationTests.cs — so no rewind had ever run outside a unit test and the memory shape, the clamping and the restore ordering had never met a frame. See .
The answer that issue asks for is "by the package", and this is it. Wiring it in a sample would have proved one game's arrangement; wiring it here means a server adds one system and tags what gets shot at, and the tracking follows the world rather than the call sites. What stays the game's is the rewind itself — RewindScope around the ray cast, at the tick the shooter claimed — because only the game knows what a shot is.
After the writeback and before the replication capture, which is where LagCompensator.Capture's own remarks say to put it: the history and the snapshot are recording the same instant for two different reasons, and a history that lags the snapshot by a tick rewinds to a world the client was never sent.
⚠ It refuses to run during a rewind rather than skipping one. That is Capture's own exception and it is deliberately not caught here: a capture taken mid-rewind records the historical poses as the present, the ring fills with its own past, and the result is a hit-registration bug that rots slowly. A scope left undisposed is a bug in the game's shot code and is worth a stack trace at the call site.
Fields and properties (5)
public SystemAccess AccessWhat this system reads and writes.
public LagCompensator CompensatorThe ring this fills.
public long CapturedTicksHow many ticks have been recorded.
public long AdoptedCountHow many bodies have been taken into the ring since this started.
public long ReleasedCountHow many have been let go, because the tag or the body went away.
Methods (3)
public LagCompensationSystem(LagCompensator compensator, TickManager clock)Creates the system.
public override JobHandle Update(in SystemContext context, JobHandle dependency)Runs the system.
public void Capture(World world, Tick at)Reconciles what is tracked with what is tagged, then records this tick.
Used by (1)
- LagCompensationSystemTestsVixen.Net.Physics.Tests