Skip to content

Commit

Permalink
Fix mapgen settings in minetest.conf being ignored (#9737)
Browse files Browse the repository at this point in the history
broken since e8a8185
  • Loading branch information
sfan5 committed Apr 26, 2020
1 parent e1fc72c commit eca6ee9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/map_settings_manager.cpp
Expand Up @@ -32,7 +32,6 @@ MapSettingsManager::MapSettingsManager(Settings *user_settings,
m_user_settings(user_settings)
{
assert(m_user_settings != NULL);
Mapgen::setDefaultSettings(m_map_settings);
}


Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit eca6ee9

Please sign in to comment.