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
Removed the GameSpy preorder functionality from the main code, as well as the Officer's Club icon in the lobby. This functionality is no longer needed.
The PreorderCreate module and MODELCONDITION_PREORDER remain, because the game data and mods use them. Dummy fields also remain in the save data (Player, SkirmishGameInfo), so old saves still load.
Made with the help of the Opus 5.5 agent.
Tested only by building on Linux in Docker. Compiled and tested on Windows.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
No actionable comments were generated in the recent review.
Walkthrough
Preorder state, retrieval, network exchange, gameplay checks, and client presentation are removed across both game variants. Player saves retain legacy preorder-field transfer for versions 7–8. Non-retail-compatible player saves use version 9, while the skirmish transfer retains the previous mask position using a zero value.
Changes
Preorder handling removal
Layer / File(s)
Summary
Remove preorder network data and retrieval Core/GameEngine/Include/GameNetwork/*, Core/GameEngine/Source/GameNetwork/GameInfo.cpp, Core/GameEngine/Source/GameNetwork/GameSpy/*
Network interfaces, peer messages, and published player statistics no longer include preorder state. The CD-key persistent-storage request and response path for retrieving preorder status is removed. The skirmish transfer writes a zero value at the former preorder-mask position.
Remove player state and retain legacy save transfer Generals/Code/GameEngine/Include/Common/Player.h, Generals/Code/GameEngine/Include/Common/WellKnownKeys.h, Generals/Code/GameEngine/Source/Common/RTS/Player.cpp, GeneralsMD/Code/GameEngine/Include/Common/Player.h, GeneralsMD/Code/GameEngine/Include/Common/WellKnownKeys.h, GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
Player preorder fields, accessors, and property keys are removed in both variants. Player transfer uses version 8 for retail-compatible saves and version 9 otherwise; versions 7–8 continue to transfer the legacy field through a temporary value.
Player setup no longer adds the preorder property to side dictionaries. PreorderCreate::onBuildComplete always clears the preorder model condition. The module comments state that preorder is unsupported and the module remains because game data uses it.
Client code no longer processes preorder responses, adds the Officers Club honor, displays its tooltip or image, or copies preorder fields into player information. The load screen still displays rank and favorite-side information and clears the officer-medal image.
This change removes obsolete preorder code and the Officer's Club lobby icon. Old saves are still handled, and no concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title 'tweak: Remove obsolete preorder code' matches the main change. The PR removes the GameSpy preorder functionality and the Officer's Club lobby icon across the GameNetwork, GameClient, GameLo…
Linked Issues check
Issue #3680 asks to remove preorder code, or to place it behind RETAIL_COMPATIBLE_DATA when retail compatibility needs it. The whole-PR summary (merge base e655cb2 to head 70bc3ce) shows both action…
Out of Scope Changes check
All summarized changes relate to preorder removal, the retail compatibility guard, or the lobby rank image that replaces the Officers Club icon:
- Player::xfer (Generals and GeneralsMD): version 9 wh…
Description check
The description states the PR removes GameSpy preorder functionality from the main code and the Officer's Club lobby icon. It also explains that the PreorderCreate module, MODELCONDITION_PREORDER, and…
Full details: Title check
Explanation
The title 'tweak: Remove obsolete preorder code' matches the main change. The PR removes the GameSpy preorder functionality and the Officer's Club lobby icon across the GameNetwork, GameClient, GameLogic, and Player code in both Generals and GeneralsMD. The 'tweak:' prefix is a conventional commit type and does not affect the assessment.
Full details: Linked Issues check
Explanation
Issue #3680 asks to remove preorder code, or to place it behind RETAIL_COMPATIBLE_DATA when retail compatibility needs it. The whole-PR summary (merge base e655cb2 to head 70bc3ce) shows both actions:
Removed: the preorder query and marking methods in GameInfo, GameSpyInfo, GameSpyInfoInterface, and Player (Generals and GeneralsMD). Also removed the preorder fields in PlayerInfo, PeerRequest/PeerResponse, and PSRequest/PSResponse, the TheKey_playerIsPreorder key, BATTLE_HONOR_OFFICERSCLUB, the CD-key stats read path in PersistentStorageThread, the lobby Officers Club icon and tooltip, and the preorder checks in PopupPlayerInfo, SkirmishGameOptionsMenu, WOLGameSetupMenu, WOLLobbyMenu, StagingRoomGameInfo, and GameLogic.
Retained: PreorderCreate remains registered and its comment states that game data still uses it. Its onBuildComplete no longer checks preorder state. The PR description and the reply in the objectives state that the module is now always registered. This is a deprecation that the issue allows.
The current head changes this module's registration compared with the previous review, which guarded it by RETAIL_COMPATIBLE_DATA. The issue accepts either removal or deprecation, so this change does not fail the requirement.
Uncertainty: the issue cites 100+ references. The summary does not show a full enumeration of remaining references, and no repository search was run for them. The listed requirement is met for the changed code paths. The reported crash at ThingTemplate.cpp lines 625-627 with RETAIL_COMPATIBLE_DATA=0 is not addressed by any summarized hunk. The objectives state that the always-registered module resolves it, and this assessment relies on that statement, not on a source inspection.
Full details: Out of Scope Changes check
Explanation
All summarized changes relate to preorder removal, the retail compatibility guard, or the lobby rank image that replaces the Officers Club icon:
Player::xfer (Generals and GeneralsMD): version 9 when RETAIL_COMPATIBLE_XFER_SAVE is disabled, version 8 otherwise. Versions 7 to 8 read the removed preorder field into a temporary value, so older saves still load. This follows from removing the field. It is a save-format behavior change that the reviewer should confirm.
SkirmishGameInfo::xfer writes a local zero value in place of m_preorderMask. This keeps the save layout stable and is tied to the removal.
WOLLobbyMenu insertPlayerInListbox uses a fixed 26-pixel rank image capped by column width. This replaces the Officers Club image sizing and is tied to the icon removal. It is a visible layout change that the reviewer should confirm.
LoadScreen explicitly clears the officer-medal image. This is tied to the removed icon.
No unrelated changes appear in the summary.
Full details: Description check
Explanation
The description states the PR removes GameSpy preorder functionality from the main code and the Officer's Club lobby icon. It also explains that the PreorderCreate module, MODELCONDITION_PREORDER, and dummy save-data fields remain, and it notes the build and test scope. The raw summary confirms these same changes across the GameNetwork, GameClient, GameLogic, and Common files.
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.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Nothing will break. The images are already scaled now; the size just used to come from OfficersClubsmall, and now it comes from a constant. If it is important that the size adapts to mods, it would probably be better to take it from one of the rank images, for example Private-N. But i think that could be done in a separate PR.
The reason will be displayed to describe this comment to others. Learn more.
The code looks correct. The description says "Some parts remain that are needed for legacy code. They are guarded by the RETAIL_COMPATIBLE_DATA define", but the diff no longer has a RETAIL_COMPATIBLE_DATA guard, because PreorderCreate is now always registered. Can that sentence be updated to say PreorderCreate and MODELCONDITION_PREORDER stay because game data and mods use them?
The reason will be displayed to describe this comment to others. Learn more.
SkirmishGameInfo::xfer keeps the old preorder mask as a dummy 0, while Player::xfer bumps the version to drop the byte. Could both use the same approach? A dummy Bool here would remove the version 9 and the #if. Same in GeneralsMD.
The reason will be displayed to describe this comment to others. Learn more.
This branch still hardcodes 20 here and in the snprintf calls below. sizeof(valueStrings[0]) would match the ValBufSize change in the broadcast branch.
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.
Closes #3680
Removed the GameSpy preorder functionality from the main code, as well as the Officer's Club icon in the lobby. This functionality is no longer needed.
The PreorderCreate module and MODELCONDITION_PREORDER remain, because the game data and mods use them. Dummy fields also remain in the save data (Player, SkirmishGameInfo), so old saves still load.
Made with the help of the Opus 5.5 agent.
Tested only by building on Linux in Docker. Compiled and tested on Windows.