You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FiringTracker::xfer does not save m_frameToForceReload. After a load it is 0, which disables the timer, so a weapon with AutoReloadWhenIdle (Rocket Buggy, Comanche missiles) loses the idle reload it had scheduled before the save. The next shot schedules a new one.
Now version 2 saves m_frameToForceReload. Builds with RETAIL_COMPATIBLE_XFER_SAVE still write version 1 without the timer. The test above used a build with it set to 0 and a newly written version 2 save. Older saves still load with the timer at 0.
Todo:
Save a skirmish with five weapons waiting on an idle reload and load it: before the fix none of them reload, after the fix the deadlines are restored and the reloads fire on the saved frames
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
Walkthrough
FiringTracker::xfer selects a save transfer version based on retail compatibility. It transfers m_frameToForceReload only when the loaded transfer version is 2 or later.
Changes
FiringTracker save transfer
Layer / File(s)
Summary
Versioned reload-frame transfer GeneralsMD/Code/GameEngine/Source/GameLogic/Object/FiringTracker.cpp, Generals/Code/GameEngine/Source/GameLogic/Object/FiringTracker.cpp
Retail-compatible saves use transfer version 1. Other saves use version 2. The function transfers m_frameToForceReload only for loaded version 2 or later.
Non-retail-compatible saves now retain pending idle reloads across loading in both variants. Retail-compatible saves keep the version-1 format and its existing limitation; no actionable merge-blocking risk is established.
Pre-merge checks | 4
✅ Passed checks (4 passed)
Check name
Status
Explanation
Description check
The description clearly explains the save/load bug, the version 2 fix, compatibility behavior, and test status.
Title check
The title clearly and concisely identifies the main change: preserving pending idle weapon reloads during save/load.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FiringTracker::xferdoes not savem_frameToForceReload. After a load it is 0, which disables the timer, so a weapon withAutoReloadWhenIdle(Rocket Buggy, Comanche missiles) loses the idle reload it had scheduled before the save. The next shot schedules a new one.Now version 2 saves
m_frameToForceReload. Builds withRETAIL_COMPATIBLE_XFER_SAVEstill write version 1 without the timer. The test above used a build with it set to 0 and a newly written version 2 save. Older saves still load with the timer at 0.Todo: