Fixed Score = -1 on worldmap display when no level has been played in a fresh slot.
authorRicardo Cruz <rick2@aeiou.pt>
Fri, 17 Sep 2004 18:56:06 +0000 (18:56 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Fri, 17 Sep 2004 18:56:06 +0000 (18:56 +0000)
SVN-Revision: 1942

src/statistics.cpp
src/worldmap.cpp

index 3553275..986138b 100644 (file)
@@ -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];
index 72e9edb..e682d80 100644 (file)
@@ -448,6 +448,8 @@ WorldMap::WorldMap()
 
   name = "<no title>";
   music = "SALCON.MOD";
+
+  total_stats.reset();
 }
 
 WorldMap::~WorldMap()