diff options
author | sfan5 <sfan5@live.de> | 2020-04-26 19:32:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-26 19:32:29 +0200 |
commit | eca6ee911a99f863abf79ab956d4c757e9e4bae3 (patch) | |
tree | d9270e95cfbe89fcad44e4e2c9d99bb7dc0fcd62 /src | |
parent | e1fc72c6f3450c82e2dd3e0892838498a6a8a092 (diff) | |
download | minetest-eca6ee911a99f863abf79ab956d4c757e9e4bae3.tar.gz minetest-eca6ee911a99f863abf79ab956d4c757e9e4bae3.tar.bz2 minetest-eca6ee911a99f863abf79ab956d4c757e9e4bae3.zip |
Fix mapgen settings in minetest.conf being ignored (#9737)
broken since e8a8185d24897ccf964327017effae81aa1c9d40
Diffstat (limited to 'src')
-rw-r--r-- | src/map_settings_manager.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/map_settings_manager.cpp b/src/map_settings_manager.cpp index 7ef4bf12e..4f070e910 100644 --- a/src/map_settings_manager.cpp +++ b/src/map_settings_manager.cpp @@ -32,7 +32,6 @@ MapSettingsManager::MapSettingsManager(Settings *user_settings, m_user_settings(user_settings) { assert(m_user_settings != NULL); - Mapgen::setDefaultSettings(m_map_settings); } @@ -180,6 +179,16 @@ MapgenParams *MapSettingsManager::makeMapgenParams() params->mgtype = mgtype; + // Load the mapgen param defaults + /* FIXME: Why is it done like this? MapgenParams should just + * set the defaults in its constructor instead. */ + { + Settings default_settings; + Mapgen::setDefaultSettings(&default_settings); + params->MapgenParams::readParams(&default_settings); + params->readParams(&default_settings); + } + // Load the rest of the mapgen params from our active settings params->MapgenParams::readParams(m_user_settings); params->MapgenParams::readParams(m_map_settings); |