Skip to content

refactor: start frame numbering at 1 instead of 0#78

Merged
fank merged 1 commit intomainfrom
refactor/frame-type
Feb 22, 2026
Merged

refactor: start frame numbering at 1 instead of 0#78
fank merged 1 commit intomainfrom
refactor/frame-type

Conversation

@fank
Copy link
Member

@fank fank commented Feb 22, 2026

Summary

  • Moves captureFrameNo increment from end to start of the capture loop in fnc_captureLoop.sqf
  • First recorded frame is now 1 instead of 0
  • Frame 0 remains the sentinel for "not yet recording" (set in fnc_init.sqf, checked in fnc_startRecording.sqf)
  • Aligns with the new Frame type convention where Frame(0) means unset/forever

Part of a coordinated change across 3 repos:

Test plan

  • Verify in-game that recording starts at frame 1
  • Verify captureFrameNo == 0 guard in fnc_startRecording.sqf still works (fresh start detection)
  • Verify captureFrameNo > 10 guard still works (already recording detection)

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.
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 Frame type convention being adopted across related projects. This change improves consistency and maintainability across the OCAP2 ecosystem.

Highlights

  • Frame Numbering Logic: The captureFrameNo increment has been moved from the end to the beginning of the capture loop in fnc_captureLoop.sqf.
  • Frame Start Index: Recording now starts at frame 1, instead of frame 0, aligning with common conventions.
  • Sentinel Value: Frame 0 is now explicitly reserved as a sentinel value, indicating "not yet recording".
  • Cross-Repository Alignment: This change is part of a coordinated effort across three repositories to standardize frame numbering and the meaning of Frame(0).
Changelog
  • addons/recorder/fnc_captureLoop.sqf
    • Moved the captureFrameNo increment operation from the end to the beginning of the capture loop.
    • Added comments explaining the new increment position and the purpose of frame 0.
Activity
  • Verified in-game that recording starts at frame 1.
  • Verified captureFrameNo == 0 guard in fnc_startRecording.sqf still works (fresh start detection).
  • Verified captureFrameNo > 10 guard still works (already recording detection).
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fank fank merged commit 6d48b6a into main Feb 22, 2026
1 check passed
@fank fank deleted the refactor/frame-type branch February 22, 2026 17:16
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.

1 participant