Count completed missions before checking if mission completion threshold reached.
This commit is contained in:
parent
620edc4127
commit
a1f65ded29
|
@ -147,10 +147,19 @@ void updateStarSystemMissions(void)
|
||||||
if (starSystem->type == SS_NORMAL && !mission->isOptional)
|
if (starSystem->type == SS_NORMAL && !mission->isOptional)
|
||||||
{
|
{
|
||||||
game.totalMissions++;
|
game.totalMissions++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mission->completed)
|
||||||
|
{
|
||||||
|
starSystem->completedMissions++;
|
||||||
|
|
||||||
|
if (starSystem->type == SS_NORMAL && !mission->isOptional)
|
||||||
|
{
|
||||||
game.completedMissions++;
|
game.completedMissions++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (starSystem = game.starSystemHead.next ; starSystem != NULL ; starSystem = starSystem->next)
|
for (starSystem = game.starSystemHead.next ; starSystem != NULL ; starSystem = starSystem->next)
|
||||||
{
|
{
|
||||||
|
@ -164,19 +173,15 @@ void updateStarSystemMissions(void)
|
||||||
{
|
{
|
||||||
starSystem->availableMissions++;
|
starSystem->availableMissions++;
|
||||||
|
|
||||||
if (mission->completed)
|
|
||||||
{
|
|
||||||
starSystem->completedMissions++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
starSystem->activeMission = mission;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (starSystem->type == SS_NORMAL && !mission->isOptional)
|
if (starSystem->type == SS_NORMAL && !mission->isOptional)
|
||||||
{
|
{
|
||||||
game.availableMissions++;
|
game.availableMissions++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mission->completed)
|
||||||
|
{
|
||||||
|
starSystem->activeMission = mission;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prev = mission;
|
prev = mission;
|
||||||
|
|
Loading…
Reference in New Issue