Merge branch 'fix-podiumcup-condition' into 'master'

Fix PodiumCup grade condition + debugchallenges fix

Closes #833

See merge request KartKrew/Kart!1929
This commit is contained in:
Oni 2024-02-18 04:11:25 +00:00
commit e0fe5543fa
2 changed files with 6 additions and 1 deletions

View file

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

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