1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-05 17:05:05 -05:00

Update mapgen params in ServerMap after Mapgen init

This commit is contained in:
kwolekr 2013-12-14 10:49:20 -05:00
parent 15c316765d
commit 7a4c1e7327
3 changed files with 6 additions and 4 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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);