diff options
-rw-r--r-- | src/defaultsettings.cpp | 1 | ||||
-rw-r--r-- | src/map.cpp | 15 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 8438bf4f5..1e17f2f3a 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -85,6 +85,7 @@ void set_default_settings() g_settings.setDefault("default_privs", "build, shout"); g_settings.setDefault("profiler_print_interval", "0"); g_settings.setDefault("enable_mapgen_debug_info", "false"); + g_settings.setDefault("fixed_map_seed", ""); g_settings.setDefault("objectdata_interval", "0.2"); g_settings.setDefault("active_object_range", "2"); diff --git a/src/map.cpp b/src/map.cpp index 27a491428..4204c2a02 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1879,10 +1879,17 @@ ServerMap::ServerMap(std::string savedir): //m_chunksize = 8; // Takes a few seconds - m_seed = (((u64)(myrand()%0xffff)<<0) - + ((u64)(myrand()%0xffff)<<16) - + ((u64)(myrand()%0xffff)<<32) - + ((u64)(myrand()%0xffff)<<48)); + if (g_settings.get("fixed_map_seed").empty()) + { + m_seed = (((u64)(myrand()%0xffff)<<0) + + ((u64)(myrand()%0xffff)<<16) + + ((u64)(myrand()%0xffff)<<32) + + ((u64)(myrand()%0xffff)<<48)); + } + else + { + m_seed = g_settings.getU64("fixed_map_seed"); + } /* Experimental and debug stuff |