From: kwolekr Date: Sat, 14 Dec 2013 15:49:20 +0000 (-0500) Subject: Update mapgen params in ServerMap after Mapgen init X-Git-Tag: 0.4.9~26 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7a4c1e7327a19820ec1e943d031c0e6e057e0156;p=oweals%2Fminetest.git Update mapgen params in ServerMap after Mapgen init --- diff --git a/src/emerge.cpp b/src/emerge.cpp index 2f757a760..6635a6518 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -91,11 +91,11 @@ public: EmergeManager::EmergeManager(IGameDef *gamedef) { //register built-in mapgens - registerMapgen("v6", new MapgenFactoryV6()); - registerMapgen("v7", new MapgenFactoryV7()); - registerMapgen("indev", new MapgenFactoryIndev()); + registerMapgen("v6", new MapgenFactoryV6()); + registerMapgen("v7", new MapgenFactoryV7()); + registerMapgen("indev", new MapgenFactoryIndev()); registerMapgen("singlenode", new MapgenFactorySinglenode()); - registerMapgen("math", new MapgenFactoryMath()); + registerMapgen("math", new MapgenFactoryMath()); this->ndef = gamedef->getNodeDefManager(); this->biomedef = new BiomeDefManager(); diff --git a/src/map.h b/src/map.h index d4656acc6..fa88109a3 100644 --- a/src/map.h +++ b/src/map.h @@ -496,6 +496,7 @@ public: u64 getSeed(){ return m_seed; } MapgenParams *getMapgenParams(){ return m_mgparams; } + void setMapgenParams(MapgenParams *mgparams){ m_mgparams = mgparams; } // Parameters fed to the Mapgen MapgenParams *m_mgparams; diff --git a/src/server.cpp b/src/server.cpp index 9d51b794b..1455de721 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -823,6 +823,7 @@ Server::Server( // Initialize mapgens m_emerge->initMapgens(mgparams); + servermap->setMapgenParams(m_emerge->params); // Give environment reference to scripting api m_script->initializeEnvironment(m_env);