diff options
author | kwolekr <kwolekr@minetest.net> | 2013-04-06 13:36:31 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-04-06 13:36:51 -0400 |
commit | 453d79e3a201a4186dae386d0bce209f75be742c (patch) | |
tree | 2f90896f77dab55580db8b9e38d4a4818fa74778 /src | |
parent | 046534e14bf95d7154b4c4217811de64dee1f8f6 (diff) | |
download | minetest-453d79e3a201a4186dae386d0bce209f75be742c.tar.gz minetest-453d79e3a201a4186dae386d0bce209f75be742c.tar.bz2 minetest-453d79e3a201a4186dae386d0bce209f75be742c.zip |
Don't re-write entire map_meta.txt if a setting is missing
Diffstat (limited to 'src')
-rw-r--r-- | src/map.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp index 39f5e30fb..c9f473dc2 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -3466,8 +3466,16 @@ void ServerMap::loadMapMeta() break; params.parseConfigLine(line); } - - MapgenParams *mgparams = m_emerge->getParamsFromSettings(¶ms); + + MapgenParams *mgparams; + try { + mgparams = m_emerge->getParamsFromSettings(¶ms); + } catch (SettingNotFoundException &e) { + infostream << "Couldn't get a setting from map_meta.txt: " + << e.what() << std::endl; + mgparams = NULL; + } + if (mgparams) { if (m_mgparams) delete m_mgparams; |