From f1f962aeae11d722b2e2b4d8d02aa51eb3d5ae8b Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 29 Nov 2015 16:50:06 +0000 Subject: [PATCH] Complete conditions when CompleteMission() is called. --- src/battle/objectives.c | 5 ----- src/galaxy/mission.c | 2 ++ src/galaxy/mission.h | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/battle/objectives.c b/src/battle/objectives.c index ac8c7dc..3fce4e0 100644 --- a/src/battle/objectives.c +++ b/src/battle/objectives.c @@ -20,9 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "objectives.h" -void completeConditions(void); -void failIncompleteObjectives(void); - void doObjectives(void) { int objectiveFailed; @@ -71,8 +68,6 @@ void doObjectives(void) { completeMission(); - completeConditions(); - updateChallenges(); } diff --git a/src/galaxy/mission.c b/src/galaxy/mission.c index 00be45b..72764f0 100644 --- a/src/galaxy/mission.c +++ b/src/galaxy/mission.c @@ -101,6 +101,8 @@ void completeMission(void) game.stats[STAT_MISSIONS_COMPLETED]++; + completeConditions(); + retreatEnemies(); player->flags |= EF_IMMORTAL; diff --git a/src/galaxy/mission.h b/src/galaxy/mission.h index 43c1976..da99384 100644 --- a/src/galaxy/mission.h +++ b/src/galaxy/mission.h @@ -41,6 +41,7 @@ extern void selectWidget(const char *name, const char *group); extern Entity *spawnExtractionPoint(void); extern Entity *spawnItem(char *type); extern void failIncompleteObjectives(void); +extern void completeConditions(void); extern void retreatEnemies(void); extern void initScript(cJSON *missionJSON);