quake3live/code/cgame
serge_shubin 6e13c747ba Client-owned camera for demo spectator
cgame runs its own PmoveSingle for the free camera using real time,
independent of server time. Solves pause freezing — camera moves
smoothly while svs.time is frozen.

Changes:
- usercmd_t: add optional origin[3] with 1-bit flag (zero cost for
  normal gameplay, 13 bytes during demo viewing)
- msg.c: serialize optional origin in usercmd delta encoding
- CG_SETCLIENTORIGIN trap: cgame sends camera origin to engine
- cl_input.c: CL_FinishMove writes cgame origin into usercmd
- cg_predict.c: CG_PredictPlayerState runs local PmoveSingle for
  free camera in svDemo mode, sends origin via trap for PVS
- cg_snapshot.c: detect follow→free camera transition, init camera
  from last known position
- cg_main.c: detect svDemo mode from CS_SVDEMO configstring,
  lazy-init camera from first snapshot's spectator spawn
- g_main.c: G_InitGame sets CS_SVDEMO configstring, G_RunFrame
  copies cmd.origin to ps.origin for PVS instead of ClientThink_real
- bg_public.h: CS_SVDEMO configstring index (26)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 03:51:51 +08:00
..
cg_consolecmds.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_draw.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +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 Client-owned camera for demo spectator 2026-03-24 03:51:51 +08:00
cg_localents.c Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_main.c Client-owned camera for demo spectator 2026-03-24 03:51:51 +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 Client-owned camera for demo spectator 2026-03-24 03:51:51 +08:00
cg_public.h Client-owned camera for demo spectator 2026-03-24 03:51:51 +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 Client-owned camera for demo spectator 2026-03-24 03:51:51 +08:00
cg_syscalls.asm Initial commit: Quake 3 1.32b GPL source 2026-03-18 13:32:24 +08:00
cg_syscalls.c Client-owned camera for demo spectator 2026-03-24 03:51:51 +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