From 3a99531a04470766e28b5dd72f470cc8b3a024e4 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 28 Apr 2018 16:09:24 +0100 Subject: [PATCH] Don't include missions complete in % stats for save label. Correctly handle %. --- src/game/game.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/game.c b/src/game/game.c index 9949f28..4de71cc 100644 --- a/src/game/game.c +++ b/src/game/game.c @@ -500,10 +500,10 @@ char *getSaveWidgetLabel(char *filename) free(text); - gameDone = stats[STAT_MISSIONS_COMPLETE] + stats[STAT_MIAS_RESCUED] + stats[STAT_TARGETS_DEFEATED] + stats[STAT_KEYS_FOUND] + stats[STAT_HEARTS_FOUND] + stats[STAT_CELLS_FOUND]; - gameTotal = game.totalMissions + game.totalMIAs + game.totalTargets + game.totalKeys + game.totalHearts + game.totalCells; + gameDone = stats[STAT_MIAS_RESCUED] + stats[STAT_TARGETS_DEFEATED] + stats[STAT_KEYS_FOUND] + stats[STAT_HEARTS_FOUND] + stats[STAT_CELLS_FOUND]; + gameTotal = game.totalMIAs + game.totalTargets + game.totalKeys + game.totalHearts + game.totalCells; - sprintf(label, "%d%% - %s", getPercent(gameDone, gameTotal), timeToString(stats[STAT_TIME_PLAYED], 1)); + sprintf(label, "%d%%%% - %s", getPercent(gameDone, gameTotal), timeToString(stats[STAT_TIME_PLAYED], 1)); return label; }