Force non-delta snapshot on map_restart during playback
snapFlagServerBit toggle alone doesn't clear client entity interpolation state. Also reset deltaMessage=-1 for all active clients, forcing the next snapshot to be full (non-delta). The client receives deltaNum<=0, clears old entity state, and renders all entities at their new positions without interpolation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
479443513a
commit
5a18130ba0
1 changed files with 9 additions and 2 deletions
|
|
@ -659,9 +659,16 @@ static qboolean SVD_ReadFrame( fileHandle_t f ) {
|
||||||
byte frameFlags;
|
byte frameFlags;
|
||||||
FS_Read( &frameFlags, 1, f );
|
FS_Read( &frameFlags, 1, f );
|
||||||
if ( frameFlags & 1 ) {
|
if ( frameFlags & 1 ) {
|
||||||
// map was restarted — toggle server bit so client
|
int j;
|
||||||
// treats next snapshot as fresh (no interpolation)
|
// map was restarted — toggle server bit and force all
|
||||||
|
// clients to receive a full (non-delta) snapshot so the
|
||||||
|
// client clears old entity state and doesn't interpolate
|
||||||
svs.snapFlagServerBit ^= SNAPFLAG_SERVERCOUNT;
|
svs.snapFlagServerBit ^= SNAPFLAG_SERVERCOUNT;
|
||||||
|
for ( j = 0; j < sv_maxclients->integer; j++ ) {
|
||||||
|
if ( svs.clients[j].state >= CS_PRIMED ) {
|
||||||
|
svs.clients[j].deltaMessage = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue