Award stats trophies at the end of a mission / challenge.

This commit is contained in:
Steve 2016-04-25 17:20:08 +01:00
parent b44794f19b
commit c02c374910
4 changed files with 10 additions and 0 deletions

View File

@ -466,6 +466,8 @@ static void completeChallenge(void)
retreatEnemies();
player->flags |= EF_IMMORTAL;
awardStatsTrophies();
}
}
@ -487,6 +489,8 @@ static void failChallenge(void)
{
battle.status = MS_TIME_UP;
}
awardStatsTrophies();
}
}

View File

@ -33,6 +33,7 @@ extern void updateAccuracyStats(unsigned int *stats);
extern char *timeToString(long millis, int showHours);
extern int getJSONValue(cJSON *node, char *name, int defValue);
extern long lookup(char *name);
extern void awardStatsTrophies(void);
extern Dev dev;
extern Battle battle;

View File

@ -262,6 +262,8 @@ void completeMission(void)
retreatEnemies();
player->flags |= EF_IMMORTAL;
awardStatsTrophies();
}
}
@ -276,6 +278,8 @@ void failMission(void)
failIncompleteObjectives();
player->flags |= EF_IMMORTAL;
awardStatsTrophies();
}
}

View File

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