Unlock next challenge mission is previous has been passed.
This commit is contained in:
parent
0bcc69ee69
commit
ebfea2b5c4
|
@ -104,16 +104,19 @@ void initChallengeHome(void)
|
||||||
static void unlockChallenges(void)
|
static void unlockChallenges(void)
|
||||||
{
|
{
|
||||||
Mission *m;
|
Mission *m;
|
||||||
int i;
|
int i, prevCompleted;
|
||||||
|
|
||||||
i = completedChallenges = totalChallenges = 0;
|
i = completedChallenges = totalChallenges = 0;
|
||||||
|
|
||||||
|
prevCompleted = 1;
|
||||||
|
|
||||||
for (m = game.challengeMissionHead.next ; m != NULL ; m = m->next)
|
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;
|
completedChallenges += m->completedChallenges;
|
||||||
totalChallenges += m->totalChallenges;
|
totalChallenges += m->totalChallenges;
|
||||||
|
prevCompleted = m->completedChallenges;
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue