From f7a1f7117e653603172d292d941cdad77f9cc7a6 Mon Sep 17 00:00:00 2001 From: theDrake Date: Sun, 16 Aug 2015 19:28:49 -0600 Subject: [PATCH] Fix mission data deletion issue --- src/space_merc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/space_merc.c b/src/space_merc.c index 0752ab5..d8f2dc1 100644 --- a/src/space_merc.c +++ b/src/space_merc.c @@ -311,7 +311,8 @@ void adjust_player_current_ammo(const int16_t amount) Function: end_mission Description: Called when the player walks into the exit, ending the current - mission. Determines how much reward money to bestow, etc. + mission. Determines how much reward money to bestow, ensures no + mission data remains in persistent storage, etc. Inputs: None. @@ -327,6 +328,7 @@ void end_mission(void) } g_current_narration = MISSION_CONCLUSION_NARRATION; show_narration(); + persist_delete(MISSION_STORAGE_KEY); } /****************************************************************************** @@ -3394,8 +3396,7 @@ void init_mission_location(void) Function: deinit_mission Description: Deinitializes the global mission struct, freeing associated - memory. Also deletes mission data (if any) from persistent - storage. + memory. Inputs: None. @@ -3407,7 +3408,6 @@ void deinit_mission(void) { free(g_mission); g_mission = NULL; - persist_delete(MISSION_STORAGE_KEY); } }