diff --git a/src/deh_soc.c b/src/deh_soc.c index fd66fb246..21057128d 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -2765,7 +2765,16 @@ static void readcondition(UINT16 set, UINT32 id, char *word2) deh_warning("Condition challenge type \"%s\" invalid for condition ID %d", params[2], id+1); return; } + + x2 = 0; + if (params[3]) + { + // fudge value + x2 = atoi(params[3]); + } } + else + x2 = 1; // guaranteed fudge for raw Unlockables count } else if ((offset=0) || fastcmp(params[0], "ADDON") || (++offset && fastcmp(params[0], "CREDITS")) diff --git a/src/m_cond.c b/src/m_cond.c index 6f488d634..96980e5b9 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1351,7 +1351,7 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) case UC_UNLOCKPERCENT: { - UINT16 i, unlocked = 0, total = 0; + UINT16 i, unlocked = cn->extrainfo2, total = 0; // Special case for maps if (cn->extrainfo1 == SECRET_MAP) @@ -1396,8 +1396,6 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) unlocked++; } - - unlocked++; // Try to account for this one too } else {