summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2020-11-22 17:49:30 +0100
committersfan5 <sfan5@live.de>2021-01-29 17:32:35 +0100
commit37a05ec8d6cbf9ff4432225cffe78c16fdd0647d (patch)
tree727e4272f1f16fe1a6a51484d1bba728c8632615 /src/server.cpp
parent5e9dd1667b244df4e7767be404d4a12966d6a90a (diff)
downloadminetest-37a05ec8d6cbf9ff4432225cffe78c16fdd0647d.tar.gz
minetest-37a05ec8d6cbf9ff4432225cffe78c16fdd0647d.tar.bz2
minetest-37a05ec8d6cbf9ff4432225cffe78c16fdd0647d.zip
Settings: Proper priority hierarchy
Remove old defaults system Introduce priority-based fallback list Use new functions for map_meta special functions Change groups to use end tags Unittest changes: * Adapt unittest to the new code * Compare Settings objects
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp
index b5352749c..aba7b6401 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -351,6 +351,7 @@ Server::~Server()
// Deinitialize scripting
infostream << "Server: Deinitializing scripting" << std::endl;
delete m_script;
+ delete m_game_settings;
while (!m_unsent_map_edit_queue.empty()) {
delete m_unsent_map_edit_queue.front();
@@ -368,6 +369,8 @@ void Server::init()
infostream << "- world: " << m_path_world << std::endl;
infostream << "- game: " << m_gamespec.path << std::endl;
+ m_game_settings = Settings::createLayer(SL_GAME);
+
// Create world if it doesn't exist
try {
loadGameConfAndInitWorld(m_path_world,