quake3live/code
serge_shubin 628007ec57 Keyframe recording and seeking
Recording:
- svdemo_keyframeInterval cvar (default 5 seconds, 0 = disabled)
- Periodic delta state reset produces full-state frames
- Frame flag bit 1 marks keyframes for reader to reset delta state
- Keyframe index (time + file offset) written at end of file
  with numKf_copy trailer for efficient playback loading
- Dynamic allocation for unlimited keyframe count

Playback:
- Keyframe index loaded from file footer on playback start
- svdemo_seek <seconds>: relative seek from current time
  Finds nearest keyframe at or before target, seeks file position,
  resets delta state + svs.time, sets SNAPFLAG_RESET_ENTITIES
  via demo.seeked flag (one-shot on next frame read)
- Normal keyframe frames only reset delta state (no visual glitch)
- Map restart frames also set SNAPFLAG_RESET_ENTITIES

Demo format: keyframe flag (bit 1) added to frame flags byte.
Backward compatible — old demos have no keyframes (numKf=0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:55:44 +08:00
..
botlib Migrate to Visual Studio 2022: replace .vcproj with .vcxproj, add .gitignore 2026-03-18 13:36:28 +08:00
bspc Migrate to Visual Studio 2022: replace .vcproj with .vcxproj, add .gitignore 2026-03-18 13:36:28 +08:00
cgame Show "Playback Paused" instead of "Connection Interrupted" 2026-03-24 04:09:47 +08:00
client Smooth unpause: reset client time delta and entity interpolation 2026-03-24 03:59:44 +08:00
game Remove redundant pm_type/speed set in ClientBegin for demo mode 2026-03-24 06:33:30 +08:00
jpeg-6 Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
macosx Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
null Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
q3_ui Copy game/cgame/ui to missionpack/ for TA configurations 2026-03-18 16:06:35 +08:00
qcommon Client-owned camera for demo spectator 2026-03-24 03:51:51 +08:00
renderer Migrate to Visual Studio 2022: replace .vcproj with .vcxproj, add .gitignore 2026-03-18 13:36:28 +08:00
server Keyframe recording and seeking 2026-03-24 18:55:44 +08:00
splines Migrate to Visual Studio 2022: replace .vcproj with .vcxproj, add .gitignore 2026-03-18 13:36:28 +08:00
ui Build system cleanup: rename to quake3live.exe, fix DLL loading, default to missionpack 2026-03-20 18:17:28 +08:00
unix Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
win32 Input sticky buttons fixed 2026-03-21 20:51:28 +08:00
cgame.lnt Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
clean.bat Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
Construct Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
game.lnt Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
installdebug.bat Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
installrelease.bat Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
installvms.bat Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
Makefile Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
opts.lnt Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
quake3.sln Build system cleanup: rename to quake3live.exe, fix DLL loading, default to missionpack 2026-03-20 18:17:28 +08:00
quake3.vcxproj Remove LZ4 compression — negligible benefit on delta data 2026-03-24 05:18:48 +08:00
quake3.vcxproj.filters Migrate to Visual Studio 2022: replace .vcproj with .vcxproj, add .gitignore 2026-03-18 13:36:28 +08:00
renderer.lnt Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
run.bat Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
runrelease.bat Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00