From 32a29489f3ecbff1fa2b72b91c699695b489be8c Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 14 Feb 2011 11:10:44 +0200 Subject: players to not be saved when map saving is disabled (due to some error) --- src/server.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/server.cpp b/src/server.cpp index f2078b9d0..739698f16 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1395,20 +1395,23 @@ void Server::AsyncRunStep() JMutexAutoLock lock(m_env_mutex); - // Save only changed parts - m_env.getMap().save(true); - - // Delete unused sectors - u32 deleted_count = m_env.getMap().deleteUnusedSectors( - g_settings.getFloat("server_unload_unused_sectors_timeout")); - if(deleted_count > 0) + if(((ServerMap*)(&m_env.getMap()))->isSavingEnabled() == true) { - dout_server<<"Server: Unloaded "< 0) + { + dout_server<<"Server: Unloaded "<