From 0708c282fcf533960241031919362a139c09a306 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 31 Mar 2023 16:01:18 +0100 Subject: [PATCH] Challenges screen: Always digest pendingkeyrounds when running out of things to look at Without this commit, if you didn't unlock a Chao Key, it would always handle unlocks, then when you returned to the menu a second time digest any pending key rounds. (Chao Key earning was always correct.) --- src/menus/extras-challenges.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index 642067e83..93c0f3ffe 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -397,6 +397,12 @@ void M_ChallengesTick(void) // We got one! M_ChallengesAutoFocus(newunlock, false); } + else if (gamedata->pendingkeyrounds > 0 + && (gamedata->chaokeys < GDMAX_CHAOKEYS)) + { + // Get ready to finish with pending chao key round tallying. + challengesmenu.chaokeyadd = true; + } else { // All done! Let's save the unlocks we've busted open.