Seeking works from paused state
Read keyframe directly in SVD_Seek_f instead of deferring to SVD_PlaybackFrame (which is blocked when paused). Both svdemo_seek and svdemo_seekexact now work regardless of pause state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d0a4310bad
commit
0ebcc76135
1 changed files with 8 additions and 3 deletions
|
|
@ -1087,8 +1087,13 @@ void SVD_Seek_f( void ) {
|
|||
demo.seeked = qtrue;
|
||||
demo.endOfDemo = qfalse;
|
||||
|
||||
// reset client snapshot timing so SV_SendClientMessages doesn't
|
||||
// skip sending (nextSnapshotTime was in the future, now svs.time is past)
|
||||
// read the keyframe directly (works even when paused)
|
||||
svs.snapFlagServerBit &= ~SNAPFLAG_RESET_ENTITIES;
|
||||
if ( !SVD_ReadFrame( demo.playFile ) ) {
|
||||
demo.endOfDemo = qtrue;
|
||||
}
|
||||
|
||||
// reset client snapshot timing
|
||||
{
|
||||
int j;
|
||||
for ( j = 0; j < sv_maxclients->integer; j++ ) {
|
||||
|
|
@ -1098,7 +1103,7 @@ void SVD_Seek_f( void ) {
|
|||
}
|
||||
}
|
||||
|
||||
// ensure one frame runs on next SV_Frame
|
||||
// ensure one frame runs on next SV_Frame (for G_RunFrame + snapshot)
|
||||
sv.timeResidual = 1000 / sv_fps->integer;
|
||||
|
||||
Com_Printf( "Seeked to time %d.\n", svs.time );
|
||||
|
|
|
|||
Loading…
Reference in a new issue