bugfix(saveload): Fix aircraft carrier losing its order when saving#2996
Open
bobtista wants to merge 3 commits into
Open
bugfix(saveload): Fix aircraft carrier losing its order when saving#2996bobtista wants to merge 3 commits into
bobtista wants to merge 3 commits into
Conversation
|
| Filename | Overview |
|---|---|
| GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/FlightDeckBehavior.cpp | Initializes the temporary command value before xfer so save paths serialize the current flight deck order. |
Reviews (3): Last reviewed commit: "docs(savegame): Remove carrier command t..." | Re-trigger Greptile
1 task
Caball009
reviewed
Jul 21, 2026
Caball009
reviewed
Jul 22, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
FlightDeckBehavior::xferreads its designated command into an uninitialized local and then assigns it back tom_designatedCommandon both save and load. On savexferIntonly writes the local out to the file, so the uninitialized stack value is written to the save and copied back over the live command. From then onhasTakeoffOrders()falls through to its default case and the carrier stops launching, so the planes already in the air finish their attack and no new ones take off.Now the local is seeded from
m_designatedCommandbefore the xfer, so saving writes the real order and the copy-back is a no-op. This does not change the save layout, so existing saves still load.Todo: