bugfix(battleplanupdate): Prevent using the Bombardment Cannon while switching Battle Plans by Stubbjax · Pull Request #2324 · TheSuperHackers/GeneralsGameCode · GitHub
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
This change fixes an issue where the Strategy Center's bombardment cannon can be manually fired while switching to another battle plan, blocking the switch in the process. The turret is now disabled as soon as it is time to pack up, rather than after the turret has finished centring.
Stubbjax
added
Bug
Something is not working right, typically is user facing
Minor
Severity: Minor < Major < Critical < Blocker
USA
Affects USA faction
Gen
Relates to Generals
ZH
Relates to Zero Hour
NoRetail
This fix or change is not applicable with Retail game compatibility
labels
Feb 19, 2026
This PR fixes a bug where the Strategy Center's bombardment cannon could be manually fired while switching to another battle plan. The fix disables the turret immediately when the plan switch is initiated and the turret needs to recenter, rather than waiting until after the turret has finished centering.
Changes:
Added enableTurret(false) call in the !m_centeringTurret branch (line 375-376 in both files)
Change is wrapped in #if !RETAIL_COMPATIBLE_CRC to preserve retail behavior compatibility
Applies to both Generals and Zero Hour versions
How it works:
Previously, when switching away from bombardment mode, the turret would only be disabled after it reached its natural centered position (line 367). This left a window where players could manually fire the cannon during the recentering process, which would block the battle plan switch. Now, enableTurret(false) is called immediately when the recentering process begins, preventing any manual firing during the transition.
Confidence Score: 5/5
This PR is safe to merge with minimal risk
The fix is a simple, targeted change that addresses a specific timing issue. It mirrors the existing pattern where enableTurret(false) is already called at line 367 when the turret is centered. The change is wrapped in a retail compatibility flag, preserving original behavior when needed. The logic is sound: disabling the turret when recentering begins prevents the race condition where manual firing could interrupt the battle plan switch.
The reason will be displayed to describe this comment to others. Learn more.
Looking good
xezon
changed the title
bugfix: Prevent using the bombardment cannon while switching battle plans
bugfix(battleplanupdate): Prevent using the Bombardment Cannon while switching Battle Plans
Feb 19, 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
BugSomething is not working right, typically is user facingGenRelates to GeneralsMinorSeverity: Minor < Major < Critical < BlockerNoRetailThis fix or change is not applicable with Retail game compatibilityUSAAffects USA factionZHRelates to Zero Hour
4 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.
This change fixes an issue where the Strategy Center's bombardment cannon can be manually fired while switching to another battle plan, blocking the switch in the process. The turret is now disabled as soon as it is time to pack up, rather than after the turret has finished centring.