Skip to content

fix: vehicle class exclusion broken when kindOf list is empty#81

Merged
fank merged 2 commits intomainfrom
fix/fries-exclude-scope
Feb 23, 2026
Merged

fix: vehicle class exclusion broken when kindOf list is empty#81
fank merged 2 commits intomainfrom
fix/fries-exclude-scope

Conversation

@fank
Copy link
Member

@fank fank commented Feb 23, 2026

Summary

  • Fix scoping bug in fnc_captureLoop.sqf: the _vic variable (vehicle reference) was declared inside the excludeKindFromRecord conditional block. When that setting was empty, _vic was never set, causing the excludeClassFromRecord check to silently fail — typeOf nil returns "" which never matches any class name.
  • Sync default value for excludeClassFromRecord to include WeaponHolderSimulated as the setting description already documents.

Context

Reported as black helicopter icons overlapping real helicopters in OCAP playback. The phantom icons are ACE_friesAnchorBar entities (ACE3 fast-rope attachment points) that should have been filtered by excludeClassFromRecord but weren't, because the server had cleared the excludeKindFromRecord setting.

Test plan

  • Verify with excludeKindFromRecord set to [] (empty) that ACE_friesAnchorBar entities are still excluded
  • Verify with both settings at defaults that exclusion works as before
  • Check recording playback for absence of phantom "Helicopter" entities at helicopter positions

… is empty

The `_vic` variable (reference to the vehicle being checked) was declared
inside the `excludeKindFromRecord` conditional block. When that setting
was empty, the block never executed, leaving `_vic` undefined. The
subsequent `excludeClassFromRecord` check silently failed because
`typeOf nil` returns "" which never matches any class name.

This caused ACE_friesAnchorBar entities (and any other class-excluded
vehicles) to be recorded despite being in the exclusion list, resulting
in phantom black helicopter icons overlapping real helicopters in
playback.

Also sync the excludeClassFromRecord default value to include
WeaponHolderSimulated as the setting description already documents.
@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 addresses a critical bug in the vehicle recording exclusion logic that could lead to unintended entities appearing in recordings. By correcting a variable scoping issue and updating a default exclusion list, it ensures that unwanted objects are properly filtered, improving the accuracy and clarity of recorded data.

Highlights

  • Scoping Bug Fix: Resolved an issue in fnc_captureLoop.sqf where the _vic variable was conditionally declared, causing vehicle exclusion checks to fail silently when excludeKindFromRecord was empty.
  • Default Setting Synchronization: Synchronized the default value for excludeClassFromRecord in XEH_preInit.sqf to consistently include WeaponHolderSimulated, matching its description.
Changelog
  • addons/recorder/XEH_preInit.sqf
    • Updated the default value for the excludeClassFromRecord setting to include WeaponHolderSimulated.
  • addons/recorder/fnc_captureLoop.sqf
    • Moved the declaration of the _vic variable outside of a conditional block to ensure it is always defined, preventing silent failures in exclusion checks.
Activity
  • No human activity has been recorded on this pull request yet.
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 correctly fixes a variable scoping bug in fnc_captureLoop.sqf that caused vehicle exclusion logic to fail silently. Additionally, it synchronizes a default setting value with its description in XEH_preInit.sqf. The changes are accurate and effectively resolve the issue. I have added one suggestion to improve performance within the capture loop, which is a critical part of the addon.

Avoid calling parseSimpleArray twice per setting (once for the emptiness
check, once for forEach) on every vehicle every frame.
@fank fank merged commit c5b18fe into main Feb 23, 2026
1 check passed
@fank fank deleted the fix/fries-exclude-scope branch February 23, 2026 12:19
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