quake3live/code/cgame
serge_shubin 7b942c77cf Server-side demo recording and playback (netdemo) — unified
Complete netdemo feature as a single commit on implant2:

Recording:
- svdemo_record/svdemo_stop commands
- Delta-compressed entity states and player states
- Server command capture (chat, prints)
- Configstring change tracking
- Keyframes at configurable interval for seeking
- Auto-record on map load (svdemo_autorecord)
- Auto-stop on map change, clean shutdown handling

Playback:
- svdemo_play loads map, spectator auto-connects
- Free camera with client-owned PmoveSingle (real-time, works paused)
- Player follow mode with full HUD
- Scoreboard with recorded player scores
- svdemo_pause with frozen trajectories and smooth unpause
- svdemo_seek (fast, keyframe-accurate) and svdemo_seekexact (precise)
- Seeking works from paused state
- SNAPFLAG_RESET_ENTITIES for clean map_restart and seek transitions
- Proper session/cvar/configstring handling across transitions
- svdemo_pauseEmpty waits for spectator before starting

Engine changes:
- usercmd_t: optional origin field for client-owned PVS
- msg.c: serialize optional usercmd origin
- cl_parse.c: SERVERCOUNT time delta reset for seek/unpause
- CG_SETCLIENTORIGIN trap for cgame-to-engine origin communication

cgame changes:
- Client-owned spectator camera (svDemoCameraPs)
- CS_SVDEMO configstring detection
- SNAPFLAG_RESET_ENTITIES entity interpolation reset
- Backwards time handling for seeking
- Local entity cleanup on seek
- Pause detection from frozen snapshot time
- Suppress connection interrupted during demo playback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:54:32 +08:00
..
cg_consolecmds.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_draw.c Server-side demo recording and playback (netdemo) — unified 2026-03-25 00:54:32 +08:00
cg_drawtools.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_effects.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_ents.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_event.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_info.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_local.h Server-side demo recording and playback (netdemo) — unified 2026-03-25 00:54:32 +08:00
cg_localents.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_main.c Server-side demo recording and playback (netdemo) — unified 2026-03-25 00:54:32 +08:00
cg_marks.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_newdraw.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_particles.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_players.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_playerstate.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_predict.c Server-side demo recording and playback (netdemo) — unified 2026-03-25 00:54:32 +08:00
cg_public.h Server-side demo recording and playback (netdemo) — unified 2026-03-25 00:54:32 +08:00
cg_scoreboard.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_servercmds.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_snapshot.c Server-side demo recording and playback (netdemo) — unified 2026-03-25 00:54:32 +08:00
cg_syscalls.asm Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_syscalls.c Server-side demo recording and playback (netdemo) — unified 2026-03-25 00:54:32 +08:00
cg_view.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_weapons.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cgame.bat Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cgame.def Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cgame.plg Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cgame.q3asm Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cgame.sh Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cgame.vcxproj Copy game/cgame/ui to missionpack/ for TA configurations 2026-03-18 16:06:35 +08:00
cgame.vcxproj.filters Migrate to Visual Studio 2022: replace .vcproj with .vcxproj, add .gitignore 2026-03-18 13:36:28 +08:00
cgame_ta.bat Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cgame_ta.q3asm Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cgame_ta.sh Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
Conscript Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
tr_types.h Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00