From: Ricardo Cruz Date: Fri, 17 Sep 2004 18:56:06 +0000 (+0000) Subject: Fixed Score = -1 on worldmap display when no level has been played in a fresh slot. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8c8ca1b664301071b32c972ec1b796301993c7db;p=supertux.git Fixed Score = -1 on worldmap display when no level has been played in a fresh slot. SVN-Revision: 1942 --- 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()