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
xezon
added
Bug
Something is not working right, typically is user facing
GUI
For graphical user interface
Minor
Severity: Minor < Major < Critical < Blocker
Gen
Relates to Generals
ThisProject
The issue was introduced by this project, or this task is specific to this project
labels
May 3, 2026
This PR restores the shortcut special powers bar in vanilla Generals by introducing canShowSpecialPowerShortcut(), a new helper that — under #ifdef RTS_GENERALS — falls back to checking for a command center rather than requiring the ShortcutPower INI flag that Generals never sets. The Zero Hour (GeneralsMD) build carries the same new function but the #ifdef block is inactive there, so its behavior is unchanged.
Confidence Score: 4/5
Safe to merge; only a minor style inconsistency found.
The logic is correct and well-scoped. The only finding is a P2 style issue (lowercase true/false vs the codebase-standard TRUE/FALSE). No logic bugs or regressions were identified.
No files require special attention beyond the style note in both ControlBar.cpp copies.
Adds canShowSpecialPowerShortcut() which uses #ifdef RTS_GENERALS to fall back to a command-center presence check; simplifies updateSpecialPowerShortcut and showSpecialPowerShortcut to use the new helper. Minor style inconsistency: lowercase true/false vs codebase-wide TRUE/FALSE.
Identical delta to the Generals CPP; #ifdef RTS_GENERALS inside canShowSpecialPowerShortcut() is intentionally inactive for Zero Hour, so behavior is unchanged there. Same true/false style inconsistency.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["updateSpecialPowerShortcut() / showSpecialPowerShortcut()"] --> B["canShowSpecialPowerShortcut()"]
B --> C{{"#ifdef RTS_GENERALS"}}
C -- "Generals build" --> D["findNaturalCommandCenter() != nullptr?"]
D -- "yes" --> E["return true (show bar)"]
D -- "no" --> F["hasAnyShortcutSelection()?"]
C -- "Zero Hour build" --> F
F -- "yes" --> E
F -- "no" --> G["hasAnyShortcutSpecialPower()?"]
G -- "yes" --> E
G -- "no" --> H["return false (hide bar)"]
LoadingPrompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---### Issue 1 of 1
Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp:3558-3574
**Inconsistent bool literal style**
The new `canShowSpecialPowerShortcut()` returns lowercase `true`/`false`, while every surrounding function in the same file (e.g. `hasAnyShortcutSelection()` returning `TRUE`/`FALSE`) uses the codebase-wide uppercase constants. The same inconsistency exists in the `GeneralsMD` copy of this function.
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
BugSomething is not working right, typically is user facingGenRelates to GeneralsGUIFor graphical user interfaceMinorSeverity: Minor < Major < Critical < BlockerThisProjectThe issue was introduced by this project, or this task is specific to this project
2 participants
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.
#2655 broke the Shortcut special powers in Generals. Reason being, Generals does not have the "ShortcutPower" flags set in the INI files.
To support the legacy setup, Generals is satisfied with the presence of the command center again.