diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2020-08-29 00:14:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-29 00:14:38 +0200 |
commit | d28f1b01707dfa15e770096a26495452513bc56f (patch) | |
tree | 5fc36c5f32a33721f0e550d5a36e85afcc1e1d45 /src | |
parent | 454009a7f2a798dfa70d881a3c9811f7e29481f7 (diff) | |
download | minetest-d28f1b01707dfa15e770096a26495452513bc56f.tar.gz minetest-d28f1b01707dfa15e770096a26495452513bc56f.tar.bz2 minetest-d28f1b01707dfa15e770096a26495452513bc56f.zip |
Mapgen: Fix on-by-default flags broken since eca6ee9 (#10318)
Diffstat (limited to 'src')
-rw-r--r-- | src/map_settings_manager.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/map_settings_manager.cpp b/src/map_settings_manager.cpp index 4f070e910..9c447b3d0 100644 --- a/src/map_settings_manager.cpp +++ b/src/map_settings_manager.cpp @@ -32,6 +32,10 @@ MapSettingsManager::MapSettingsManager(Settings *user_settings, m_user_settings(user_settings) { assert(m_user_settings != NULL); + + Mapgen::setDefaultSettings(m_map_settings); + // This inherits the combined defaults provided by loadGameConfAndInitWorld. + m_map_settings->overrideDefaults(user_settings); } @@ -179,20 +183,8 @@ 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); - params->readParams(m_user_settings); params->readParams(m_map_settings); // Hold onto our params |