From 46dcfe00004a64a7ae3908539c8be95fe11a0daf Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 9 Oct 2023 13:01:25 +0100 Subject: [PATCH] Experiment for Challenges menu: The completion percentage only counts unlocks, but the Chao Medal meter fill subtracts major unlock skips Should communicate the fact you're short of True Completion a little better. --- src/menus/extras-challenges.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index a2830807b..92b4d48ee 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -100,10 +100,14 @@ static void M_UpdateChallengeGridVisuals(void) challengesmenu.unlockcount[CMC_MEDALID] = 0; + challengesmenu.unlockcount[CMC_MEDALFILLED] = + (medalheight * ( + challengesmenu.unlockcount[CMC_UNLOCKED] + - challengesmenu.unlockcount[CMC_MAJORSKIPPED] + )) / challengesmenu.unlockcount[CMC_TOTAL]; + if (challengesmenu.unlockcount[CMC_PERCENT] == 100) { - challengesmenu.unlockcount[CMC_MEDALFILLED] = medalheight; - if (challengesmenu.unlockcount[CMC_KEYED] == 0) { challengesmenu.unlockcount[CMC_MEDALID] = 2; @@ -116,10 +120,6 @@ static void M_UpdateChallengeGridVisuals(void) } else { - challengesmenu.unlockcount[CMC_MEDALFILLED] = - (medalheight * challengesmenu.unlockcount[CMC_UNLOCKED]) - /challengesmenu.unlockcount[CMC_TOTAL]; - if (challengesmenu.unlockcount[CMC_MEDALFILLED] == 0 && challengesmenu.unlockcount[CMC_UNLOCKED] != 0) { // Cheat to give you a sliver of pixel.