Skip to content

bugfix(CreditsMenu): delay credits music until shell exit game - #3472

Open
DrGoldFish1 wants to merge 1 commit into
TheSuperHackers:mainfrom
DrGoldFish1:bugfix(CreditsMenu)-delay-credits-music-until-shell-exit-game
Open

DrGoldFish1 wants to merge 1 commit into
TheSuperHackers:mainfrom
DrGoldFish1:bugfix(CreditsMenu)-delay-credits-music-until-shell-exit-game

Conversation

@DrGoldFish1

@DrGoldFish1 DrGoldFish1 commented Oct 11, 2026 •

Copy link
Copy Markdown

Creditsmenu track is only playing when there is no shell map active. This is due to the track being called before the shell map is terminated, resulting in the track getting terminated with it. This change lets the shell map to be fully closed until we call upon the track to be played.

So if you now go to the creditsmenu with or without a shell map the creditstrack will be playing.

Copied it also to generals.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d36aade6-5c02-4b12-9385-a31f289ff5d7
📥 Commits

Reviewing files that changed from the base of the PR and between bc29a5f and 278614b.

📒 Files selected for processing (2)
  • Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/CreditsMenu.cpp
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/CreditsMenu.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

Both credits-menu implementations defer setup and presentation until an update runs while the game is not in-game. The menu remains hidden while activation is pending. Shutdown clears the pending state and cleans up an existing credits manager.

Changes

Credits Menu Activation

Layer / File(s) Summary
Defer credits menu activation
Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/CreditsMenu.cpp, GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/CreditsMenu.cpp
Initialization marks activation pending and hides the layout. An update initializes and presents credits, sets focus, and starts the Credits audio event when activation is pending and the game is not in-game. The update then clears the flag. The shell does not pop while activation is pending. Shutdown clears the flag and cleans up the credits manager when it exists.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: xezon

Merge Risk: ⚪ Minimal · up to 27861

Credits music starts after the shell-map audio reset. No identified issue remains that should prevent merging.

Pre-merge checks: Passed 4
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly states the main change: delay credits music until the shell exits.
Description check Passed The description explains the credits music issue, the deferred playback fix, and that the change was copied to Generals.
  • 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Defers credits and their music until the shell map has finished closing in both game versions.

  • The credits screen and music start after the shell game exits.

Reviews (2) · Last reviewed commit: "bugfix(CreditsMenu): delay credits music..." · Reviewed by Greptile

//-------------------------------------------------------------------------------------------------
void CreditsMenuUpdate( WindowLayout *layout, void *userData )
{
if (playCreditsMusic && !TheGameLogic->isInGame())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting this into the update means it is a workaround, and not a proper fix.

Try to initialize the Credits Menu after the shell map is unloaded, or in other words unload the shell map before the Credits Menu is initialized. That would be the cleanest way dealing with it - unless of course it causes other troubles.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it so the shell map gets closed fully before initializing the credits menu.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new edit looks worse than before :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me see if I can clean this code up. Upon inspection is does seem more like a mess doesnt it.

@DrGoldFish1
DrGoldFish1 force-pushed the bugfix(CreditsMenu)-delay-credits-music-until-shell-exit-game branch from bc29a5f to 278614b Compare October 11, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Generals Credits Track to the Zero Hours Credits menu

2 participants