diff --git a/src/challenges/challengeHome.c b/src/challenges/challengeHome.c index e340508..127a020 100644 --- a/src/challenges/challengeHome.c +++ b/src/challenges/challengeHome.c @@ -104,16 +104,19 @@ void initChallengeHome(void) static void unlockChallenges(void) { Mission *m; - int i; + int i, prevCompleted; i = completedChallenges = totalChallenges = 0; + prevCompleted = 1; + for (m = game.challengeMissionHead.next ; m != NULL ; m = m->next) { - m->available = (i <= completedChallenges || dev.debug); + m->available = (prevCompleted > 0 || dev.debug); completedChallenges += m->completedChallenges; totalChallenges += m->totalChallenges; + prevCompleted = m->completedChallenges; i++; }