From: Ricardo Cruz Date: Thu, 1 Jul 2004 15:25:02 +0000 (+0000) Subject: Found the evil bug that was causing the tilemap to not differ interactive, foreground... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4b8bc284bec10dcd7e0f2381551e06219c75c197;p=supertux.git Found the evil bug that was causing the tilemap to not differ interactive, foreground or background tiles, in the new level format. It was really simple: there were two variables with the same name! A local string in parse() and an integer in the Tilemap class, both called layer. Dunno why g++ didn't report any warning... I think spawn points are not being saved. Matze, could you do that? :) SVN-Revision: 1526 --- diff --git a/src/tilemap.cpp b/src/tilemap.cpp index 42abf7b4c..a877dc911 100644 --- a/src/tilemap.cpp +++ b/src/tilemap.cpp @@ -43,16 +43,16 @@ TileMap::TileMap(LispReader& reader) { tilemanager = TileManager::instance(); - std::string layer; - if(reader.read_string("layer", layer)) { - if(layer == "background") + std::string layer_str; + if(reader.read_string("layer", layer_str)) { + if(layer_str == "background") layer = LAYER_BACKGROUNDTILES; - else if(layer == "interactive") + else if(layer_str == "interactive") layer = LAYER_TILES; - else if(layer == "foreground") + else if(layer_str == "foreground") layer = LAYER_FOREGROUNDTILES; else - std::cerr << "Unknown layer '" << layer << "' in tilemap.\n"; + std::cerr << "Unknown layer '" << layer_str << "' in tilemap.\n"; } reader.read_bool("solid", solid);