aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorkwolekr <mirrorisim@gmail.com>2013-01-22 22:32:30 -0500
committerkwolekr <mirrorisim@gmail.com>2013-01-23 16:16:49 -0500
commit91e88196c7c0e7ee87c1fd4783b3999710510a65 (patch)
treede0bcf3fccf209c8396f6cc251477a54ad7b3460 /src/server.cpp
parent035933f806d3afc45e2e558e505318489209a70b (diff)
downloadminetest-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.cpp13
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);