diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-07-28 03:08:09 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-07-28 03:08:09 +0300 |
commit | c9ed379e39be94b588f4b62f893760c53b2d2a4f (patch) | |
tree | 7b1c83af5bd323c299997d3bcdb9cc44046e2d72 /src/server.cpp | |
parent | e64feefc61e0fd104bfc40c61411b67423734924 (diff) | |
download | minetest-c9ed379e39be94b588f4b62f893760c53b2d2a4f.tar.gz minetest-c9ed379e39be94b588f4b62f893760c53b2d2a4f.tar.bz2 minetest-c9ed379e39be94b588f4b62f893760c53b2d2a4f.zip |
Add enable_rollback_recording setting, defaulting to false
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp index 6a126b60d..05dff06c5 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -937,6 +937,7 @@ Server::Server( m_banmanager(path_world+DIR_DELIM+"ipban.txt"), m_rollback(NULL), m_rollback_sink_enabled(true), + m_enable_rollback_recording(false), m_lua(NULL), m_itemdef(createItemDefManager()), m_nodedef(createNodeDefManager()), @@ -1873,6 +1874,10 @@ void Server::AsyncRunStep() counter = 0.0; m_emergethread.trigger(); + + // Update m_enable_rollback_recording here too + m_enable_rollback_recording = + g_settings->getBool("enable_rollback_recording"); } } @@ -4658,6 +4663,8 @@ MtEventManager* Server::getEventManager() } IRollbackReportSink* Server::getRollbackReportSink() { + if(!m_enable_rollback_recording) + return NULL; if(!m_rollback_sink_enabled) return NULL; return m_rollback; |