fix: detect entity deletion by Zeus and scripts via null tracking#109
fix: detect entity deletion by Zeus and scripts via null tracking#109
Conversation
The dedup optimization (commits 83/84) combined with extension gap-fill caused Zeus-deleted entities to persist in recordings. Without an explicit DELETE command, gap-fill extends the last alive state to the end of the recording. Units: add trackedUnits HashMap mirroring trackedVehicles. Each frame, check for null object handles and send :SOLDIER:DELETE: when detected. Remove from HashMap on disconnect/respawn to avoid duplicate DELETEs. Vehicles: the existing isNull detection sent a final dead state but no :VEHICLE:DELETE:, so gap-fill had no boundary. Now sends DELETE after the dead state. Catches all deletion sources: Zeus, deleteVehicle, garbage collection.
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 introduces robust entity deletion tracking for both units and vehicles within the recorder system. It resolves a critical issue where deleted entities, particularly those removed by Zeus or scripts, would incorrectly persist in recordings, leading to inaccurate playback. By implementing explicit deletion detection and corresponding Highlights
Changelog
Activity
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 comprehensive tracking for individual units (soldiers) in addition to existing vehicle tracking. It initializes a new trackedUnits hash map, adds units to this map upon initialization, and ensures their removal with corresponding :SOLDIER:DELETE: events when units die, disconnect, or disappear from the game world. Additionally, :VEHICLE:DELETE: events are now explicitly sent when tracked vehicles disappear, enhancing the accuracy of recorded entity lifecycles.
Summary
trackedUnitsHashMap (mirroringtrackedVehicles) to detect deleted units viaisNullcheck each frame, sending:SOLDIER:DELETE:when detected. Removes entries on disconnect/respawn to avoid duplicate DELETEs.isNulldetection sent a final dead state but no:VEHICLE:DELETE:, so gap-fill had no termination boundary. Now sends DELETE after the dead state.deleteVehicle, garbage collection.Root cause
The dedup optimization (commits
88eabe7/424bed3) combined with extension gap-fill (eea4801) caused Zeus-deleted entities to persist in recordings forever. Without an explicit DELETE command, gap-fill extends the last alive state to the end of the recording.Test plan