Add sequence numbers to server broadcasts and client state handling for out-of-order update detection.
Dynamic Branch Deploy / build-and-deploy (push) Successful in 9m53s

This commit is contained in:
Sebastian Unterschütz committed 2026-01-06 18:52:27 +01:00
1 parent 2a635d0aaa
commit 23d42d42e7
5 files changed
+21

No files matched your search

+1
View File
@@ -92,6 +92,7 @@ type Game struct {
pendingInputs map[uint32]InputState // Noch nicht bestätigte Inputs
lastServerSeq uint32 // Letzte vom Server bestätigte Sequenz
predictionMutex sync.Mutex // Mutex für pendingInputs
lastRecvSeq uint32 // Letzte empfangene Server-Sequenznummer (für Out-of-Order-Erkennung)
// Smooth Correction
correctionX float64 // Verbleibende Korrektur in X