mirror of
https://github.com/minetest/minetest.git
synced 2024-08-20 13:34:17 +02:00
Mapgen: Fix on-by-default flags broken since eca6ee9 (#10318)
This commit is contained in:
parent
454009a7f2
commit
d28f1b0170
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user