Skip to content

feat: recover client demo playback - #62

Open
samussd wants to merge 2 commits into
B2BF:mainfrom
samussd:feat/demo-playback
Open

samussd wants to merge 2 commits into
B2BF:mainfrom
samussd:feat/demo-playback

Conversation

@samussd

@samussd samussd commented Oct 22, 2026

Copy link
Copy Markdown

Community -> Battlerecorder -> Select File -> Play File

Recover the client's demo playback path from the retail BF2.exe and the
symbolized dedicated ELF, so a .bf2demo recorded by a 1.50 server plays from
the BattleRecorder menu page:

- DemoRecorder playback stream: initPlayback (user camera), openPlaybackStream,
  readData, internalReadData, readNextFrameHeader and handleSpecialPacket, the
  camera arm of close() and the destructor; stopCameraRecording closes, as
  both binaries do
- DemoSpectatorCamera (new translation unit): free and follow cameras,
  spectator keys, slow-motion presets, nametag target and playback view; the
  DemoRecorder forwarders replace their stops
- GameClient: load, update, receive, setSimulationRate, playDemo, restartDemo,
  handleDataBlock and the demo slots; the IGameClient demo slots keep their
  positions with [INFERRED] names, and isDemoPlaying becomes isDemoAtEnd
- BF2Engine::playDemo hides the HUD; HudInformationLayer shows the demo camera
  and the followed player
- BattleRecorder: DemoLibrary derives from HTTPRequest; getListEntries
  "demos" / "demobm" and Multiplay.playDemo / deleteDemo
- bf2_demo_playback_read joins bf2_run_checks; new BattleRecorder fixture
The HUD's demo radio menus run demo.shutdownDemo (end-user defaults) and
demo.restartDemo, togglePlayerDemo, toggleCameraDemo and toggleDemoPauseOrPlay
(full-access defaults). Kept in its own commit because B2BF#56 registers the same
commands against the old IGameClient slot names.
@matthias-hoste

Copy link
Copy Markdown
Contributor

Gonna test it later but it already looks quite good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants