From 1596feb636839028696e5fb6a0826bd73e7450ab Mon Sep 17 00:00:00 2001 From: Cyd Date: Tue, 11 Aug 2026 12:18:02 -0500 Subject: [PATCH] The recording is sound; it is missing its first packet First live recording, from a Live Cam watching one racer: 2,937,892 bytes, 14,342 packets. Verified independently of the game by walking the file - the declared payload matches the bytes present exactly, and the packet chain walks to the exact end of the file at exactly 14,342 packets, which is the count the log reported. The timestamps span 308.9 seconds, which is the five minute race. Every packet carries fromHost 3, the one racer, and the mix is 15 entity creations against 14,326 updates. The motion is all there and the format is right. What is missing is the frame around it. Every packet came from clientID 3, the interest manager, and none from the network manager - so there is no LoadMission, no RunMission, no StopMission in the spool. On a camera host the console is LOCAL: it posts those messages straight into the application rather than sending them over the wire, so the tee, which sits on the receive path, never sees them. The review build got them because its console was a remote machine. That is exactly one blocker for playback, and a specific one: NetworkPacket *packet = (NetworkPacket*)spool->GetPointer(); Verify(packet->messageData.messageID == RunMissionMessageID); Playback requires the FIRST packet in the spool to be RunMission, and ours is an entity update. So the remaining work is not "capture more" - the pod motion is complete - it is to synthesise the handful of control packets the local console never sends, with RunMission at the head of the file. Small and well defined, but the ordering is the whole of it and it wants doing carefully rather than quickly. Also fixed: the size in the log read GetBytesUsed AFTER SaveAs, which rewinds the stream, so a 2.8MB recording reported "0KB". Co-Authored-By: Claude Opus 5 (1M context) --- MUNGA/SPOOLER.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MUNGA/SPOOLER.cpp b/MUNGA/SPOOLER.cpp index 0d90faf..90a708c 100644 --- a/MUNGA/SPOOLER.cpp +++ b/MUNGA/SPOOLER.cpp @@ -352,12 +352,18 @@ void newtime.tm_hour, newtime.tm_min, newtime.tm_sec ); + // + // Read the size BEFORE saving: SaveAs rewinds the stream when it is + // done, so asking afterwards reports nothing written at all - which + // is what the first recording's log said, next to a 2.8MB file. + // + size_t written = spool->GetBytesUsed(); + spool->SaveAs(filename); CopyFileA(filename, "last.spl", FALSE); DEBUG_STREAM << "Record: wrote " << filename << " - " - << packetsRecorded << " packets, " - << (spool->GetBytesUsed() / 1024) << "KB" + << packetsRecorded << " packets, " << (written / 1024) << "KB" << (full ? " (truncated - buffer filled)" : "") << "\n" << std::flush; }