Reset playback delta state on map_restart marker
The recording resets its delta state on map_restart (writes from zero baseline). The playback must do the same, otherwise the delta decoder uses stale pre-restart state as baseline, producing corrupt entity data and preventing EF_TELEPORT_BIT from being decoded correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5a18130ba0
commit
595cf9864b
1 changed files with 6 additions and 3 deletions
|
|
@ -660,9 +660,12 @@ static qboolean SVD_ReadFrame( fileHandle_t f ) {
|
||||||
FS_Read( &frameFlags, 1, f );
|
FS_Read( &frameFlags, 1, f );
|
||||||
if ( frameFlags & 1 ) {
|
if ( frameFlags & 1 ) {
|
||||||
int j;
|
int j;
|
||||||
// map was restarted — toggle server bit and force all
|
// map was restarted — reset playback delta state to match
|
||||||
// clients to receive a full (non-delta) snapshot so the
|
// the recording's reset (both now decode from zero baseline).
|
||||||
// client clears old entity state and doesn't interpolate
|
// Also toggle server bit and force non-delta snapshot so the
|
||||||
|
// client clears old entity state and doesn't interpolate.
|
||||||
|
Com_Memset( demo.playPrevEntities, 0, sizeof(demo.playPrevEntities) );
|
||||||
|
Com_Memset( demo.playPrevPlayers, 0, sizeof(demo.playPrevPlayers) );
|
||||||
svs.snapFlagServerBit ^= SNAPFLAG_SERVERCOUNT;
|
svs.snapFlagServerBit ^= SNAPFLAG_SERVERCOUNT;
|
||||||
for ( j = 0; j < sv_maxclients->integer; j++ ) {
|
for ( j = 0; j < sv_maxclients->integer; j++ ) {
|
||||||
if ( svs.clients[j].state >= CS_PRIMED ) {
|
if ( svs.clients[j].state >= CS_PRIMED ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue