Award post mission trophies upon mission completion.
This commit is contained in:
parent
5de2356bec
commit
e62676711d
|
@ -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)
|
||||||
|
|
|
@ -264,6 +264,11 @@ void completeMission(void)
|
||||||
player->flags |= EF_IMMORTAL;
|
player->flags |= EF_IMMORTAL;
|
||||||
|
|
||||||
awardStatsTrophies();
|
awardStatsTrophies();
|
||||||
|
|
||||||
|
if (!game.currentMission->challengeData.isChallenge)
|
||||||
|
{
|
||||||
|
awardPostMissionTrophies();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue