From: Ingo Ruhnke Date: Thu, 25 Mar 2004 16:50:13 +0000 (+0000) Subject: - cleanup in the worldmap X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a2082fb3c934d20c9b5f41cf3da9a3d48f61eef6;p=supertux.git - cleanup in the worldmap - fixed duplicate badguy bug SVN-Revision: 365 --- diff --git a/src/level.cpp b/src/level.cpp index 9fb802c45..a2fdb97ef 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -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: */ diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 144a20ce9..86249cc91 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -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((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 {