Server:
- Reset nextSnapshotTime for active clients after seek so
SV_SendClientMessages doesn't skip sending (was comparing
future nextSnapshotTime against past svs.time)
- First frame always a keyframe (beginning seekable)
- Keyframes during normal playback only reset delta state,
no SNAPFLAG_RESET_ENTITIES (no visual glitch every 5 sec)
Engine client:
- Reset cl.oldFrameServerTime on SERVERCOUNT toggle to prevent
"time went backwards" error in CL_SetCGameTime
cgame:
- Handle backwards time in CG_ProcessSnapshots for demo seek:
accept the time jump, reset cg.time, clear all entity state
(currentValid, interpolate, time-dependent fields), clear
local entities (particles, gibs, smoke), wait for next snapshot
- Prevents CG_InterpolateEntityPosition NULL nextSnap error
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On unpause, toggle SNAPFLAG_SERVERCOUNT and set SNAPFLAG_RESET_ENTITIES.
In CL_ParseSnapshot, detect SERVERCOUNT toggle and hard-reset
cl.serverTimeDelta instead of letting CL_AdjustTimeDelta slowly drift.
During pause, the delta drifted because snapshots had frozen serverTime
while cls.realtime advanced. Without the hard reset, it took 1-2 seconds
of choppy interpolation to re-sync.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>