Vixen
02b45cc4
csharp
public sealed class PlayerInputQuantizeSystem

Rounds each player's intent to what the wire can carry, before anything acts on it.

Read the guide page for this →

As a system

Phase
Input

Remarks

A system rather than a line in a manual. The client sends a quantized input and the server computes from the decoded numbers; a client that predicted with its full-precision intent would disagree with the server by the rounding on every tick, on a connection with no loss at all — and the cost is a rollback per snapshot, which reads as jitter and profiles as the prediction feature working hard.

It was documented in three places before it was a system, which is the weaker answer: a footgun you have written about is still a footgun. Registering this makes it impossible to forget, and a single-player build simply does not register it.

Between PlayerInputSystem and PossessionSystem, in the same phase. The first writes the intent from a device, this rounds it in place, and the third forwards it to the pawn — so the pawn, the wire and the prediction all see the same numbers, and the controller's own copy is the rounded one too, which is what a UI reading it should show.

Fields and properties (2)

  • public SystemAccess Access
  • public int RoundedCount

    How many intents were rounded on the last pass.

Methods (2)

Used by (1)

  • PlayerInputQuantizeSystemTestsVixen.Net.Engine.Tests