The reconciliation system caused visible teleportation at high latency
(e.g. 250ms Germany→Korea): position corrections snapped the local
player and thrown items back to stale server states.
- Drop the inputAck/seq tracking, InputBuffer, and applyReconciliation.
The client predicts locally and the server stays authoritative via
the existing worldUpdate broadcast; own-doll updates remain ignored.
- Override Item.setUpdateData on the client so in-flight items run free
on local Box2D physics (client and server share the same throw
impulse) and only sync when stationary or far out of sync. This keeps
grab-sensor contact accurate while eliminating mid-flight snapping.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The old PUNKBUSTER check compared client-reported position to server
position and snapped the player back when latency made them diverge,
which felt like getting teleported under any real network conditions.
Replaces that with proper client-side prediction + reconciliation:
client tags each input with a sequence number and keeps an input
buffer; server tracks the last processed sequence and reports its
authoritative position via a per-user inputAck alongside each
worldUpdate. The client only corrects when the actual disagreement
exceeds what the unacked input time can explain — so steady-state
movement runs purely on local physics, and only genuine unexpected
events (collisions, being hit) trigger a smooth blend toward the
server state.
Includes adaptive threshold scaling so high-latency sessions don't
false-positive corrections during normal running.
The state of the shift modifier is now distributed across the
network. Walking speeds and animation states are being updated
according to it.
Fixes#130