Count completed missions before checking if mission completion threshold reached.

This commit is contained in:
Steve 2016-08-12 12:23:11 +01:00
parent 620edc4127
commit a1f65ded29
1 changed files with 15 additions and 10 deletions

View File

@ -147,10 +147,19 @@ void updateStarSystemMissions(void)
if (starSystem->type == SS_NORMAL && !mission->isOptional)
{
game.totalMissions++;
}
if (mission->completed)
{
starSystem->completedMissions++;
if (starSystem->type == SS_NORMAL && !mission->isOptional)
{
game.completedMissions++;
}
}
}
}
for (starSystem = game.starSystemHead.next ; starSystem != NULL ; starSystem = starSystem->next)
{
@ -164,19 +173,15 @@ void updateStarSystemMissions(void)
{
starSystem->availableMissions++;
if (mission->completed)
{
starSystem->completedMissions++;
}
else
{
starSystem->activeMission = mission;
}
if (starSystem->type == SS_NORMAL && !mission->isOptional)
{
game.availableMissions++;
}
if (!mission->completed)
{
starSystem->activeMission = mission;
}
}
prev = mission;