added ignoring of map_meta.txt to better support old maps
authorPerttu Ahola <celeron55@gmail.com>
Sun, 10 Apr 2011 21:06:07 +0000 (00:06 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 10 Apr 2011 21:06:07 +0000 (00:06 +0300)
src/map.cpp

index 7fe58dc115f9b240bcd9e780343f5194faa6c76b..5ab7e5b028fbe22cf89d155d244297874deb803b 100644 (file)
@@ -1834,16 +1834,16 @@ ServerMap::ServerMap(std::string savedir):
                        }
                        else
                        {
-                               // Load map metadata (seed, chunksize)
-                               loadMapMeta();
-                               
                                try{
+                                       // Load map metadata (seed, chunksize)
+                                       loadMapMeta();
+
                                        // Load chunk metadata
                                        loadChunkMeta();
                                }
                                catch(FileNotGoodException &e){
                                        dstream<<DTIME<<"WARNING: Server: Could not load "
-                                                       <<"chunk metafile. Disabling chunk-based "
+                                                       <<"metafile(s). Disabling chunk-based "
                                                        <<"generation."<<std::endl;
                                        m_chunksize = 0;
                                }
@@ -4967,7 +4967,7 @@ void ServerMap::loadMapMeta()
 {
        DSTACK(__FUNCTION_NAME);
        
-       dstream<<"INFO: ServerMap::loadMapMeta(): Loading chunk metadata"
+       dstream<<"INFO: ServerMap::loadMapMeta(): Loading map metadata"
                        <<std::endl;
 
        std::string fullpath = m_savedir + "/map_meta.txt";
@@ -4976,7 +4976,7 @@ void ServerMap::loadMapMeta()
        {
                dstream<<"ERROR: ServerMap::loadMapMeta(): "
                                <<"could not open"<<fullpath<<std::endl;
-               throw FileNotGoodException("Cannot open chunk metadata");
+               throw FileNotGoodException("Cannot open map metadata");
        }
 
        Settings params;