debugchallenges: unset conditionset achieved

If you undo an unlock, fixes that unlock automatically
unlocking itself the next time conditions are evaluated.
This commit is contained in:
James R 2024-02-17 16:38:11 -08:00
parent 793e56b66d
commit 2e60465638

View file

@ -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();
}