Skip to content

Fix vehicle tracking: ejection seats, disappeared vehicles, parachute lifetime#48

Merged
fank merged 2 commits intomainfrom
fix/vehicle-tracking-issues
Feb 13, 2026
Merged

Fix vehicle tracking: ejection seats, disappeared vehicles, parachute lifetime#48
fank merged 2 commits intomainfrom
fix/vehicle-tracking-issues

Conversation

@fank
Copy link
Member

@fank fank commented Feb 13, 2026

Summary

Fixes three vehicle tracking issues identified from recording analysis (FLO_20260213_004801):

  • Ejection seats classified as "car": RHS K36D-5 ejection seats matched isKindOf "Car" before reaching the ParachuteBase check. Added displayName-based detection for "ejection" before the Car check in fnc_getClass.sqf, classifying them as "parachute".

  • Destroyed/despawned vehicles not marked dead: 23 of 24 planes were deleted by mission scripts (CAS despawning) without transitioning to alive=0. Added a trackedVehicles HashMap storing object references with last-known position. After each vehicle loop, isNull detects deleted objects and sends a final dead state. O(1) per check, no per-frame array comparisons.

  • Parachutes/ejection seats tracked forever: Ejection seats persisted with alive=1 and empty crew for thousands of frames. Now, parachute-class vehicles with no crew get a final alive=0 state and are excluded from further tracking.

Note: Projectile markers staying forever (endFrame=-1) is an extension bug — the SQF correctly sends 119 :DELETE:MARKER: calls which the extension acknowledges but does not apply. Not addressed in this PR.

Test plan

  • Verify ejection seats (RHS K36D-5) show as parachute icons instead of car icons
  • Verify planes despawned by scripts transition to dead state in recording
  • Verify parachutes/ejection seats disappear after crew exits
  • Verify no performance regression in capture loop frame time (check debug log)

… lifetime

- Classify ejection seats (e.g. RHS K36D-5) as "parachute" instead of "car"
  by checking displayName before the Car isKindOf check
- Detect vehicles deleted by scripts/garbage collection and send a final
  dead state using stored last-known position (via HashMap + isNull check)
- Stop tracking parachutes/ejection seats after crew exits by sending a
  final dead state and excluding from further capture
@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 significantly enhances the accuracy and efficiency of vehicle tracking within the recording system. It addresses several issues where vehicles were either misclassified, not correctly marked as dead upon despawning, or tracked beyond their relevant lifetime. The changes ensure that recorded vehicle states are more precise, reflecting their actual status in the game world, and optimize the tracking process by properly terminating tracking for irrelevant objects.

Highlights

  • Ejection Seat Classification: Ejection seats, previously misclassified as 'car', are now correctly identified as 'parachute' based on their display name, resolving an icon display issue.
  • Despawned Vehicle Tracking: Vehicles that are destroyed or despawned by mission scripts are now accurately detected and marked as dead, preventing them from being tracked indefinitely with an 'alive' status.
  • Parachute/Ejection Seat Lifetime: Parachutes and ejection seats are no longer tracked indefinitely; they are now marked as dead and removed from tracking once their crew exits, improving recording accuracy and resource management.
Changelog
  • addons/recorder/fnc_captureLoop.sqf
    • Initialized a new HashMap, GVAR(trackedVehicles), to store references to tracked vehicles along with their last known position and direction.
    • Implemented logic to mark parachute-class vehicles as dead and cease tracking them once their crew is empty.
    • Introduced a mechanism to detect and mark as dead any vehicles that have been deleted or despawned, ensuring their final state is recorded.
    • Updated vehicle tracking to store object references and their last known state in GVAR(trackedVehicles) for efficient isNull checks.
  • addons/recorder/fnc_getClass.sqf
    • Added a displayName-based check to correctly classify ejection seats as 'parachute' before the general 'Car' classification.
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 introduces several important fixes for vehicle tracking, including correctly classifying ejection seats, handling disappeared vehicles, and managing parachute lifetimes. The changes are logical and well-implemented. I've added a couple of suggestions to improve the data accuracy for disappeared vehicles by storing and using more of their last-known state, which will prevent the use of incorrect placeholder values in the recording.

Use actual last-known side, vectorDir, vectorUp instead of placeholders
when sending the final dead state for deleted vehicles.
@fank fank merged commit aad0f1f into main Feb 13, 2026
1 check passed
@fank fank deleted the fix/vehicle-tracking-issues branch February 13, 2026 10:55
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