Skip to content

fix: marker creation frame formula and Zeus temp marker exclusion#90

Merged
fank merged 4 commits intomainfrom
fix/marker-frame-and-zeus-exclusion
Mar 5, 2026
Merged

fix: marker creation frame formula and Zeus temp marker exclusion#90
fank merged 4 commits intomainfrom
fix/marker-frame-and-zeus-exclusion

Conversation

@fank
Copy link
Member

@fank fank commented Mar 5, 2026

Summary

  • Fixed broken frame number formula in marker creation time adjustment (fnc_handleMarkers.sqf:120). The old formula ceil _lastFrameTime - (_delta / frameCaptureDelay) treated a game-time value (~26.5) as a frame number, producing floats like 24.951 instead of the correct frame (~15). This caused MARKER:STATE updates to have frames before the creation frame, making markers stay invisible in playback until the next property change (e.g. sector capture color change).
  • Added RscAttribute to default marker exclusion list to filter Zeus attribute editor temp markers (e.g. RscAttributeAreaSize) that produce junk recording entries with invalid coordinates like [0, 0, -185.97].

Root cause

The 2-second CBA_fnc_waitAndExecute delay on MarkerCreated means GVAR(captureFrameNo) has advanced by the time the creation is processed. The old formula attempted to backdate the frame but mixed up time values and frame numbers:

Old:  ceil(26.539) - (2.049 / 1) = 24.951  (wrong, also a float)
New:  floor((24.49 - 9.539) / 1) = 15      (correct integer frame)

Test plan

  • hemtt build succeeds (45 SQF compiled, 3 PBOs, 0 errors)
  • Test with Zeus-placed sector markers: verify creation frame ≤ first state update frame
  • Verify RscAttributeAreaSize markers no longer appear in recording data
  • Verify sector color changes display correctly in web playback

The marker creation time adjustment formula confused game-time values
with frame numbers, producing floats (e.g. 24.951) far from the correct
frame (~15). This caused MARKER:STATE updates to have frames before the
creation frame, breaking playback (markers stayed invisible until the
next property change).

Fix: compute creation frame directly from creationTime and startTime.

Also add 'RscAttribute' to the default marker exclusion list to filter
Zeus attribute editor temp markers (e.g. RscAttributeAreaSize) that
produce junk entries with invalid coordinates.
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 resolves two issues affecting marker recording and playback. It corrects the frame calculation for newly created markers to ensure they are properly displayed from their initial creation frame during playback. Additionally, it prevents temporary Zeus attribute editor markers from being recorded, eliminating invalid data entries and improving data cleanliness.

Highlights

  • Marker Creation Frame Formula Fix: Fixed an incorrect formula in fnc_handleMarkers.sqf that previously treated game-time values as frame numbers, leading to markers appearing invisible until their first property change in playback. The new formula correctly calculates the integer frame number, ensuring markers are visible from their creation frame.
  • Zeus Temporary Marker Exclusion: Added RscAttribute to the default marker exclusion list in XEH_preInit.sqf to prevent Zeus attribute editor temporary markers (e.g., RscAttributeAreaSize) from being recorded. These markers previously generated junk entries with invalid coordinates, cluttering recording data.
Changelog
  • addons/recorder/XEH_preInit.sqf
    • Added 'RscAttribute' to the default marker exclusion list in the OCAP_settings_excludeMarkerFromRecord setting description.
    • Updated the default value for the OCAP_settings_excludeMarkerFromRecord setting to include 'RscAttribute'.
  • addons/recorder/fnc_handleMarkers.sqf
    • Modified the conditional check for marker creation time to ensure it's positive and less than the current game time.
    • Replaced the incorrect frame calculation logic for backdating marker creation frames with a new formula: (floor ((_creationTime - GVAR(startTime)) / GVAR(frameCaptureDelay))) max 1.
    • Adjusted the debug logging parameters to reflect the updated frame calculation logic.
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

This pull request effectively addresses two separate issues. First, it corrects a faulty formula for calculating a marker's creation frame number, which was causing playback visibility problems. The new formula properly uses time-based arithmetic to determine the correct integer frame, resolving the issue. Second, it adds 'RscAttribute' to the default marker exclusion list, which will prevent temporary markers from the Zeus editor from creating unwanted data in recordings. The changes are well-explained, logical, and appear to correctly fix the described problems.

@fank fank merged commit 229d962 into main Mar 5, 2026
1 check passed
@fank fank deleted the fix/marker-frame-and-zeus-exclusion branch March 5, 2026 23:47
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