diff options
author | kwolekr <mirrorisim@gmail.com> | 2013-01-22 22:32:30 -0500 |
---|---|---|
committer | kwolekr <mirrorisim@gmail.com> | 2013-01-23 16:16:49 -0500 |
commit | 91e88196c7c0e7ee87c1fd4783b3999710510a65 (patch) | |
tree | de0bcf3fccf209c8396f6cc251477a54ad7b3460 /src/server.cpp | |
parent | 035933f806d3afc45e2e558e505318489209a70b (diff) | |
download | minetest-91e88196c7c0e7ee87c1fd4783b3999710510a65.tar.gz minetest-91e88196c7c0e7ee87c1fd4783b3999710510a65.tar.bz2 minetest-91e88196c7c0e7ee87c1fd4783b3999710510a65.zip |
Make mapgen factory setup more elegant, add mapgen_v6.h
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/server.cpp b/src/server.cpp index d227474aa..a8640ad10 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1097,15 +1097,14 @@ Server::Server( // Add default biomes after nodedef had its aliases added m_biomedef->addDefaultBiomes(); - // Initialize Environment - ServerMap *servermap = new ServerMap(path_world, this); - m_env = new ServerEnvironment(servermap, m_lua, this, this); - // Create emerge manager - m_emerge = new EmergeManager(this, m_biomedef, servermap->getMapgenParams()); + m_emerge = new EmergeManager(this, m_biomedef); - // Give map pointer to the emerge manager - servermap->setEmerge(m_emerge); + // Initialize Environment + ServerMap *servermap = new ServerMap(path_world, this, m_emerge); + m_env = new ServerEnvironment(servermap, m_lua, this, this); + + m_emerge->initMapgens(servermap->getMapgenParams()); // Give environment reference to scripting api scriptapi_add_environment(m_lua, m_env); |