1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix unused (and so, broken) enable_rollback_recording. This option must be reloaded at server loop but loaded when server starts, for data consistency (not a hot load variable)

ok @ShadowNinja
This commit is contained in:
Loic Blot 2015-02-17 20:09:36 +01:00
parent b019221c30
commit 27d4e89d32
5 changed files with 29 additions and 9 deletions

View file

@ -243,9 +243,6 @@ Server::Server(
std::string ban_path = m_path_world + DIR_DELIM "ipban.txt";
m_banmanager = new BanManager(ban_path);
// Create rollback manager
m_rollback = new RollbackManager(m_path_world, this);
ModConfiguration modconf(m_path_world);
m_mods = modconf.getMods();
std::vector<ModSpec> unsatisfied_mods = modconf.getUnsatisfiedMods();
@ -353,6 +350,12 @@ Server::Server(
// Initialize mapgens
m_emerge->initMapgens();
m_enable_rollback_recording = g_settings->getBool("enable_rollback_recording");
if (m_enable_rollback_recording) {
// Create rollback manager
m_rollback = new RollbackManager(m_path_world, this);
}
// Give environment reference to scripting api
m_script->initializeEnvironment(m_env);
@ -1068,10 +1071,6 @@ void Server::AsyncRunStep(bool initial_step)
counter = 0.0;
m_emerge->startThreads();
// Update m_enable_rollback_recording here too
m_enable_rollback_recording =
g_settings->getBool("enable_rollback_recording");
}
}