aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-04-06 13:36:31 -0400
committerkwolekr <kwolekr@minetest.net>2013-04-06 13:36:51 -0400
commit453d79e3a201a4186dae386d0bce209f75be742c (patch)
tree2f90896f77dab55580db8b9e38d4a4818fa74778 /src
parent046534e14bf95d7154b4c4217811de64dee1f8f6 (diff)
downloadminetest-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.cpp12
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(&params);
+
+ MapgenParams *mgparams;
+ try {
+ mgparams = m_emerge->getParamsFromSettings(&params);
+ } 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;