From 3570f3e396acad4a6b5381d06c2dae5cf4e95fbd Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sat, 15 Feb 2014 18:20:15 -0500 Subject: Add minetest.set_noiseparam_defaults() Lua API --- src/emerge.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/emerge.cpp') 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; -- cgit v1.2.3