refactor: start frame numbering at 1 instead of 0#78
Conversation
Move the captureFrameNo increment from end to start of the capture loop so the first recorded frame is 1. Frame 0 remains the sentinel for "not yet recording", aligning with the new Frame type convention where Frame(0) means unset/forever.
Summary of ChangesHello @fank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the frame numbering logic within the recording addon to ensure that frame capture consistently begins at frame 1. By moving the frame number increment to the start of the capture loop, frame 0 is now explicitly reserved as a sentinel value, enhancing clarity and aligning with a new Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The refactor successfully implements the change to start frame numbering at 1 instead of 0, which aligns with the project's new sentinel value convention. The logic for frame-based intervals and time updates has been correctly adjusted to account for this shift. I have identified one optimization opportunity regarding network traffic in the capture loop.
Summary
captureFrameNoincrement from end to start of the capture loop infnc_captureLoop.sqffnc_init.sqf, checked infnc_startRecording.sqf)Frametype convention whereFrame(0)means unset/foreverPart of a coordinated change across 3 repos:
Test plan
captureFrameNo == 0guard infnc_startRecording.sqfstill works (fresh start detection)captureFrameNo > 10guard still works (already recording detection)