Award post mission trophies upon mission completion.

This commit is contained in:
Steve 2016-04-29 08:42:10 +01:00
parent 5de2356bec
commit e62676711d
3 changed files with 6 additions and 13 deletions

View File

@ -387,19 +387,6 @@ static void postBattle(void)
game.stats[STAT_EPIC_KILL_STREAK] = MAX(game.stats[STAT_EPIC_KILL_STREAK], battle.stats[STAT_EPIC_KILL_STREAK]); game.stats[STAT_EPIC_KILL_STREAK] = MAX(game.stats[STAT_EPIC_KILL_STREAK], battle.stats[STAT_EPIC_KILL_STREAK]);
updateAccuracyStats(game.stats); updateAccuracyStats(game.stats);
if (!game.currentMission->challengeData.isChallenge)
{
if (game.currentMission && !game.currentMission->completed)
{
game.currentMission->completed = (battle.status == MS_COMPLETE || !battle.numObjectivesTotal);
if (game.currentMission->completed)
{
awardPostMissionTrophies();
}
}
}
} }
void destroyBattle(void) void destroyBattle(void)

View File

@ -264,6 +264,11 @@ void completeMission(void)
player->flags |= EF_IMMORTAL; player->flags |= EF_IMMORTAL;
awardStatsTrophies(); awardStatsTrophies();
if (!game.currentMission->challengeData.isChallenge)
{
awardPostMissionTrophies();
}
} }
} }

View File

@ -61,6 +61,7 @@ extern void loadChallenge(Mission *mission, cJSON *node);
extern Entity *spawnMine(int type); extern Entity *spawnMine(int type);
extern void activateNextWaypoint(void); extern void activateNextWaypoint(void);
extern void awardStatsTrophies(void); extern void awardStatsTrophies(void);
extern void awardPostMissionTrophies(void);
extern Battle battle; extern Battle battle;
extern Dev dev; extern Dev dev;