From 37a05ec8d6cbf9ff4432225cffe78c16fdd0647d Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 22 Nov 2020 17:49:30 +0100 Subject: 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 --- src/server.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server.cpp') 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, -- cgit v1.2.3