- cleanup in the worldmap
authorIngo Ruhnke <grumbel@gmx.de>
Thu, 25 Mar 2004 16:50:13 +0000 (16:50 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Thu, 25 Mar 2004 16:50:13 +0000 (16:50 +0000)
- fixed duplicate badguy bug

SVN-Revision: 365

src/level.cpp
src/worldmap.cpp

index 9fb802c..a2fdb97 100644 (file)
@@ -553,6 +553,8 @@ void level_free(st_level* plevel)
   plevel->theme.clear();
   plevel->song_title.clear();
   plevel->bkgd_image.clear();
+
+  plevel->badguy_data.clear();
 }
 
 /* Load graphics: */
index 144a20c..86249cc 100644 (file)
@@ -260,8 +260,8 @@ WorldMap::load_map()
                       Level level;
                       LispReader reader(lisp_cdr(element));
                       reader.read_string("name",  &level.name);
-                      reader.read_int("x-pos", &level.x);
-                      reader.read_int("y-pos", &level.y);
+                      reader.read_int("x", &level.x);
+                      reader.read_int("y", &level.y);
                       levels.push_back(level);
                     }
                   
@@ -420,9 +420,11 @@ WorldMap::update()
               gameloop(const_cast<char*>((datadir +  "levels/default/" + i->name).c_str()),
                        1, ST_GL_LOAD_LEVEL_FILE);
               play_music(song, 1);
-              break;
+              return;
             }
         }
+      std::cout << "Nothing to enter at: "
+                << tux->get_tile_pos().x << ", " << tux->get_tile_pos().y << std::endl;
     }
   else
     {