quake3live/code/server
serge_shubin a8044aad8b Server-side demo recording and playback (netdemo)
Records full entity state array each server frame, enabling
free-camera demo playback from any viewpoint.

Recording:
- svdemo_record <name> / svdemo_stop
- Captures entityState_t + PVS fields (svFlags, linked,
  currentOrigin, absmin, absmax) for all active entities
- Records configstring changes per frame
- File format: svdemos/<name>.svdm

Playback:
- svdemo_play <name>
- Loads map with maxclients=64, reserves recorded player slots
  (CS_ZOMBIE with safe rate/timing) so spectator gets a high slot
- Injects recorded entities into sv.gentities each frame with
  SV_LinkEntity for PVS visibility
- Re-applies demo configstrings (CS_PLAYERS etc.) after map load,
  skipping CS_SERVERINFO/CS_SYSTEMINFO to avoid latch restarts
- Game module runs in demo mode (sv_demoplaying cvar): G_RunFrame
  only processes spectator movement, skips all entity logic
- Spectator forced to TEAM_SPECTATOR on connect (ClientBegin)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 04:28:55 +08:00
..
server.h Server-side demo recording and playback (netdemo) 2026-03-23 04:28:55 +08:00
sv_bot.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
sv_ccmds.c Server-side demo recording and playback (netdemo) 2026-03-23 04:28:55 +08:00
sv_client.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
sv_game.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
sv_init.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
sv_main.c Server-side demo recording and playback (netdemo) 2026-03-23 04:28:55 +08:00
sv_net_chan.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
sv_netdemo.c Server-side demo recording and playback (netdemo) 2026-03-23 04:28:55 +08:00
sv_rankings.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
sv_snapshot.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
sv_world.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00