Conversation
…s after disconnect Two issues fixed: 1. Non-bullet projectiles (smoke grenades, flares) never reach the extension on dedicated servers. The Deleted EH doesn't fire reliably for long-lived projectiles due to locality transfer or engine cleanup bypassing it. Fix: the per-frame handler (which already runs for non-bullet projectiles) now holds a direct reference to the data array and acts as a failsafe sender when it detects isNull. A shared sent flag at data index 20 prevents duplicate sends with the Deleted EH. 2. Placed objects (mines, explosives) that detonate after the placer disconnects never get a PLACED:EVENT, so their markers persist forever in playback. The client-side Explode/Deleted EHs are lost on disconnect. Fix: the server adds a Local EH to placed objects that re-attaches Explode/Deleted EHs when the object transfers to the server, ensuring detonation is captured regardless of client connectivity.
Summary of ChangesHello, 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 critical issues in projectile and placed object tracking within the recording system. It introduces robust mechanisms to ensure that long-lived projectiles and objects placed by disconnecting players are correctly tracked and their lifecycle events are captured, improving the accuracy and completeness of recorded data. Highlights
Changelog
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
This pull request introduces two important fixes for projectile and placed object tracking. For long-lived projectiles, a per-frame handler now acts as a failsafe to ensure data is sent even if the Deleted event handler doesn't fire, using a flag to prevent duplicate events. For placed objects like mines, a server-side Local event handler is added to re-attach lifecycle event handlers when the placer disconnects, ensuring detonations are always captured. The changes are logical and address the described issues effectively. I have one suggestion to improve maintainability by reducing code duplication in the new server-side fallback logic.
Non-bullet projectiles (grenades, smoke, rockets) move from client-side to server-side data accumulation to fix reliability issues on dedicated servers where the Deleted EH doesn't fire due to locality transfer.
…pdate headers Remove PFH failsafe and sent flag from fnc_eh_fired_clientBullet.sqf — non-bullet projectiles now use fnc_eh_fired_clientProjectile.sqf (server-side lifecycle). Update file comment headers to reflect the new architecture.
The Local EH is not supported on mine/explosive objects (engine error: "Unknown enum value: Local"). Replace with a tracked hashmap + 30s periodic check that detects when placed objects transfer to the server and re-adds Explode/Deleted EHs.
Summary
DeletedEH doesn't fire reliably due to locality transfer. Non-bullet projectiles now stream position/hit data to the server via CBA events, with the server accumulating and sending the finalEVENT:PROJECTILEto the extension. Bullets (shotBullet) remain fully client-side — unchanged. A 120s server-side timeout cleans up orphaned entries if the client crashes.PLACED:EVENT, so their markers persisted forever in playback. The server now adds aLocalEH to placed objects that re-attachesExplode/DeletedEHs when the object transfers to the server on disconnect.Files changed
fnc_eh_fired_clientProjectile.sqffnc_eh_fired_server.sqftrackedProjectileshashmap, 4 CBA handlers + timeout PFH, placed objectLocalEH fallbackfnc_eh_fired_client.sqfshotBullet→ clientBullet, everything else → clientProjectilefnc_eh_fired_clientBullet.sqfXEH_prep.sqfTest plan
EVENT:PROJECTILEarrives with positions (PFH sampling)