mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Don't re-write entire map_meta.txt if a setting is missing
This commit is contained in:
parent
046534e14b
commit
453d79e3a2
1 changed files with 10 additions and 2 deletions
10
src/map.cpp
10
src/map.cpp
|
@ -3467,7 +3467,15 @@ void ServerMap::loadMapMeta()
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue