Use isSol, rather than strcmp.

This commit is contained in:
Steve 2016-04-29 08:38:36 +01:00
parent dca34036a7
commit 7593577c81
2 changed files with 4 additions and 4 deletions

View File

@ -148,7 +148,7 @@ void updateStarSystemMissions(void)
}
}
if (strcmp(starSystem->name, "Sol") != 0)
if (!starSystem->isSol)
{
game.totalMissions += starSystem->totalMissions;
game.completedMissions += starSystem->completedMissions;
@ -161,7 +161,7 @@ void updateStarSystemMissions(void)
for (mission = starSystem->missionHead.next ; mission != NULL ; mission = mission->next)
{
mission->available = strcmp(starSystem->name, "Sol") == 0 || isMissionAvailable(mission, prev);
mission->available = starSystem->isSol || isMissionAvailable(mission, prev);
if (mission->available)
{
@ -171,7 +171,7 @@ void updateStarSystemMissions(void)
prev = mission;
}
if (strcmp(starSystem->name, "Sol") != 0)
if (starSystem->isSol)
{
game.availableMissions += starSystem->availableMissions;
}

View File

@ -103,7 +103,7 @@ static void calculatePercentComplete(void)
for (starSystem = game.starSystemHead.next ; starSystem != NULL ; starSystem = starSystem->next)
{
if (strcmp(starSystem->name, "Sol"))
if (!starSystem->isSol)
{
completed += starSystem->completedMissions;
total += starSystem->totalMissions;