Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29769/src
Modified Files:
statistics.cpp worldmap.cpp
Log Message:
Fixed Score = -1 on worldmap display when no level has been played in a fresh slot.
Index: statistics.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/statistics.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- statistics.cpp 17 Sep 2004 12:53:24 -0000 1.8
+++ statistics.cpp 17 Sep 2004 18:56:06 -0000 1.9
@@ -232,6 +232,8 @@
{
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: worldmap.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- worldmap.cpp 16 Sep 2004 15:04:18 -0000 1.119
+++ worldmap.cpp 17 Sep 2004 18:56:06 -0000 1.120
@@ -448,6 +448,8 @@
name = "<no title>";
music = "SALCON.MOD";
+
+ total_stats.reset();
}
WorldMap::~WorldMap()
|