feat: add :SOLDIER:DELETE: and :VEHICLE:DELETE: commands#135
Conversation
Allow the addon to report entity removal (disconnect, respawn corpse) so the v1 builder uses per-entity delete frames as gap-fill boundaries instead of extending every entity to maxFrame.
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 enhances the recording system's ability to accurately represent the lifecycle of soldiers and vehicles by introducing explicit deletion events. This ensures that when entities are removed from the game world, their presence in recorded data correctly terminates at the point of removal, leading to more precise and realistic playback of mission events. 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 :SOLDIER:DELETE: and :VEHICLE:DELETE: commands to handle entity removal during a recording. This is achieved by adding a DeleteFrame to soldier and vehicle records, which is then used by the v1 JSON exporter to determine the entity's final frame, preventing them from persisting as frozen markers. The changes span across parsing, storage backends, and the worker dispatcher to support the new commands. The implementation looks solid and correctly follows the described logic. I've left one comment regarding code duplication in the new parser functions, which could be refactored for better maintainability.
Cover ParseSoldierDelete, ParseVehicleDelete, DeleteSoldier, DeleteVehicle, dispatch handlers, and builder DeleteFrame gap-fill boundary.
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
Summary
:SOLDIER:DELETE:and:VEHICLE:DELETE:commands so the addon can report entity removal (disconnect, respawn corpse)DeleteFrameon the entity and uses it as the gap-fill boundary in the v1 builder instead ofmaxFrameChanges
DeleteFramefield onSoldierandVehicleParseSoldierDelete/ParseVehicleDeleteDeleteSoldier/DeleteVehicleonBackendDeleteFrameon the recordsendEnvelopeDeleteFrameas gap-fill boundary for last state (falls back tomaxFramewhen 0)Test plan
go test ./...passes