WIP checkpoint: Client-side position sync + prediction/reconciliation

This commit is contained in:
2026-08-21 01:18:34 +00:00
parent 140db9df91
commit bae326e14c
3 changed files with 22 additions and 16 deletions
+5
View File
@@ -73,6 +73,11 @@ func _run() -> void:
var reconcile_handler := func(err): reconciled_this_round = true; correction_seen = err
net.reconciled.connect(reconcile_handler)
for i in 60:
# Keep predicting (with no movement input) so the prediction buffer's
# latest entry actually reflects the desynced position -- without
# this, the buffer either empties out or keeps stale pre-desync
# entries, and _handle_snapshot has nothing real to compare against.
net.predict_and_send(1.0 / 30.0, 0.0, 0.0, false)
await process_frame
if reconciled_this_round:
break