From 14dbe2b39c140cf80922fb0dd3fb4d24bbd7e26f Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 31 Mar 2018 18:41:22 +0100 Subject: [PATCH] Count number of trophies during loading, to prevent amount from accumulating. --- src/game/trophies.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/trophies.c b/src/game/trophies.c index 93c518f..5ae5e8d 100644 --- a/src/game/trophies.c +++ b/src/game/trophies.c @@ -57,8 +57,6 @@ void initTrophies(void) alertRect.h = 90; alertRect.y = 10; - numTrophies = 0; - awarded = 0; sparkleAngle = 0; @@ -357,6 +355,8 @@ void loadTrophyData(void) text = readFile(filename); root = cJSON_Parse(text); + + numTrophies = 0; for (node = root->child ; node != NULL ; node = node->next) {