From 8c8ca1b664301071b32c972ec1b796301993c7db Mon Sep 17 00:00:00 2001 From: Ricardo Cruz Date: Fri, 17 Sep 2004 18:56:06 +0000 Subject: [PATCH] Fixed Score = -1 on worldmap display when no level has been played in a fresh slot. SVN-Revision: 1942 --- src/statistics.cpp | 2 ++ src/worldmap.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/statistics.cpp b/src/statistics.cpp index 355327595..986138b8f 100644 --- a/src/statistics.cpp +++ b/src/statistics.cpp @@ -232,6 +232,8 @@ Statistics::operator+=(const Statistics& stats_) { for(int i = 0; i < NUM_STATS; i++) { + if(stats_.stats[i][STOTAL] == -1) + continue; stats[i][SPLAYER] += stats_.stats[i][SPLAYER]; if(stats_.stats[i][STOTAL] != -1) stats[i][STOTAL] += stats_.stats[i][STOTAL]; diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 72e9edbf9..e682d80ba 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -448,6 +448,8 @@ WorldMap::WorldMap() name = ""; music = "SALCON.MOD"; + + total_stats.reset(); } WorldMap::~WorldMap() -- 2.11.0