From 2e60465638c15dd970a6c380c3b95060f1cc84b5 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 17 Feb 2024 16:38:11 -0800 Subject: [PATCH 1/2] debugchallenges: unset conditionset achieved If you undo an unlock, fixes that unlock automatically unlocking itself the next time conditions are evaluated. --- src/menus/extras-challenges.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index 8e6395437..0911e9632 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -792,6 +792,11 @@ boolean M_ChallengesInputs(INT32 ch) if (cv_debugchallenges.value && challengesmenu.currentunlock < MAXUNLOCKABLES && challengesmenu.unlockanim >= UNLOCKTIME && gamedata->unlocked[challengesmenu.currentunlock] == true) { gamedata->unlocked[challengesmenu.currentunlock] = gamedata->unlockpending[challengesmenu.currentunlock] = false; + UINT16 set = unlockables[challengesmenu.currentunlock].conditionset; + if (set > 0 && set <= MAXCONDITIONSETS) + { + gamedata->achieved[set - 1] = false; + } M_UpdateChallengeGridVisuals(); } From cc240600e9731f970431a77e953553476f3e5b97 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 17 Feb 2024 16:39:05 -0800 Subject: [PATCH 2/2] M_CheckCondition: fix UCRP_PODIUMCUP GP grade - PodiumCup grade condition was completely broken and checked against the cup ID instead of the grade letter --- src/m_cond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_cond.c b/src/m_cond.c index 9414e73fa..98b1548e3 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1628,7 +1628,7 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) ) return false; if (cn->extrainfo2 != 0) - return (K_PodiumGrade() >= cn->requirement); + return (K_PodiumGrade() >= cn->extrainfo1); if (cn->extrainfo1 != 0) return (player->position != 0 && player->position <= cn->extrainfo1);