aboutsummaryrefslogtreecommitdiff
path: root/src/emerge.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-02-15 18:20:15 -0500
committerkwolekr <kwolekr@minetest.net>2014-02-15 19:13:14 -0500
commit3570f3e396acad4a6b5381d06c2dae5cf4e95fbd (patch)
tree1ce53a41271802efdd9f88de83b2c68e06cd2f33 /src/emerge.cpp
parentc87316487840fd176662207acef4fb15286e32e8 (diff)
downloadminetest-3570f3e396acad4a6b5381d06c2dae5cf4e95fbd.tar.gz
minetest-3570f3e396acad4a6b5381d06c2dae5cf4e95fbd.tar.bz2
minetest-3570f3e396acad4a6b5381d06c2dae5cf4e95fbd.zip
Add minetest.set_noiseparam_defaults() Lua API
Diffstat (limited to 'src/emerge.cpp')
-rw-r--r--src/emerge.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/emerge.cpp b/src/emerge.cpp
index 9760839c8..0e805c95a 100644
--- a/src/emerge.cpp
+++ b/src/emerge.cpp
@@ -125,15 +125,6 @@ EmergeManager::EmergeManager(IGameDef *gamedef) {
emergethread.push_back(new EmergeThread((Server *)gamedef, i));
infostream << "EmergeManager: using " << nthreads << " threads" << std::endl;
-
- loadParamsFromSettings(g_settings);
-
- if (g_settings->get("fixed_map_seed").empty()) {
- params.seed = (((u64)(myrand() & 0xffff) << 0)
- | ((u64)(myrand() & 0xffff) << 16)
- | ((u64)(myrand() & 0xffff) << 32)
- | ((u64)(myrand() & 0xffff) << 48));
- }
}
@@ -168,6 +159,18 @@ EmergeManager::~EmergeManager() {
}
+void EmergeManager::loadMapgenParams() {
+ loadParamsFromSettings(g_settings);
+
+ if (g_settings->get("fixed_map_seed").empty()) {
+ params.seed = (((u64)(myrand() & 0xffff) << 0)
+ | ((u64)(myrand() & 0xffff) << 16)
+ | ((u64)(myrand() & 0xffff) << 32)
+ | ((u64)(myrand() & 0xffff) << 48));
+ }
+}
+
+
void EmergeManager::initMapgens() {
if (mapgen.size())
return;