From ad690c46b10423b23d515bda0e89228b51f5b5e9 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Tue, 27 Jan 2015 22:29:02 -0500 Subject: Write common mapgen params to map_meta.txt on world initialization --- src/emerge.cpp | 5 ++++- src/subgame.cpp | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/emerge.cpp b/src/emerge.cpp index e81793ff8..2926b0c0b 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -380,8 +380,11 @@ void EmergeManager::loadParamsFromSettings(Settings *settings) delete params.sparams; params.sparams = createMapgenParams(params.mg_name); - if (params.sparams) + + if (params.sparams) { + params.sparams->readParams(g_settings); params.sparams->readParams(settings); + } } diff --git a/src/subgame.cpp b/src/subgame.cpp index 94d9be181..fd2679eae 100644 --- a/src/subgame.cpp +++ b/src/subgame.cpp @@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "porting.h" #include "filesys.h" #include "settings.h" +#include "main.h" #include "log.h" #include "strfnd.h" #ifndef SERVER @@ -265,15 +266,37 @@ std::vector getAvailableWorlds() bool initializeWorld(const std::string &path, const std::string &gameid) { - infostream<<"Initializing world at "<