From cf5939dd3c4f8802084b4c1eda19bc246b9ef0d9 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 18 Mar 2018 07:40:39 +0000 Subject: [PATCH] Trophy display bug fix. --- src/game/trophies.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/game/trophies.c b/src/game/trophies.c index cf0822e..0543ac8 100644 --- a/src/game/trophies.c +++ b/src/game/trophies.c @@ -67,13 +67,13 @@ void initTrophies(void) savedScreenshot = 0; page = 0; - - maxPages = STAT_TIME_PLAYED; - maxPages /= TROPHIES_PER_PAGE; - maxPages = ceil(maxPages); loadTrophyData(); + maxPages = numTrophies; + maxPages /= TROPHIES_PER_PAGE; + maxPages = ceil(maxPages); + resetAlert(); } @@ -389,6 +389,8 @@ static void loadTrophyData(void) t->stat = lookup(cJSON_GetObjectItem(node, "stat")->valuestring); t->statValue = cJSON_GetObjectItem(node, "statValue")->valueint; } + + numTrophies++; } cJSON_Delete(root);