mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Settings: Fix game minetest.conf flags overriding defaults (#9404)
The game minetest.conf flags directly overwrote the global minetest.conf default values, resulting in unwanted erased mapgen flags. * Fix set_mapgen_setting
This commit is contained in:
parent
6958071f49
commit
e8a8185d24
5 changed files with 29 additions and 9 deletions
|
@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "settings.h"
|
||||
#include "log.h"
|
||||
#include "util/strfnd.h"
|
||||
#include "defaultsettings.h" // for override_default_settings
|
||||
#include "defaultsettings.h" // for set_default_settings
|
||||
#include "mapgen/mapgen.h" // for MapgenParams
|
||||
#include "util/string.h"
|
||||
|
||||
|
@ -298,7 +298,7 @@ bool loadGameConfAndInitWorld(const std::string &path, const SubgameSpec &gamesp
|
|||
set_default_settings(g_settings);
|
||||
Settings game_defaults;
|
||||
getGameMinetestConfig(gamespec.path, game_defaults);
|
||||
override_default_settings(g_settings, &game_defaults);
|
||||
g_settings->overrideDefaults(&game_defaults);
|
||||
|
||||
infostream << "Initializing world at " << path << std::endl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue