Repository navigation
bugfix(CreditsMenu): delay credits music until shell exit game - #3472
DrGoldFish1 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughBoth 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. ChangesCredits Menu Activation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
|
| //------------------------------------------------------------------------------------------------- | ||
| void CreditsMenuUpdate( WindowLayout *layout, void *userData ) | ||
| { | ||
| if (playCreditsMusic && !TheGameLogic->isInGame()) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I changed it so the shell map gets closed fully before initializing the credits menu.
There was a problem hiding this comment.
let me see if I can clean this code up. Upon inspection is does seem more like a mess doesnt it.
bc29a5f to
278614b
Compare
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.