aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2016-10-19 01:37:12 +0100
committerparamat <mat.gregory@virginmedia.com>2016-10-20 03:40:47 +0100
commit63a3bb229a9ff288ab01e3e80c8477da5e84ee1e (patch)
tree9f39f171b60c435c0092b29c2c325f702a11e6c0 /src
parentc7d569b8636d8046393715e46fca40e58138183f (diff)
downloadminetest-63a3bb229a9ff288ab01e3e80c8477da5e84ee1e.tar.gz
minetest-63a3bb229a9ff288ab01e3e80c8477da5e84ee1e.tar.bz2
minetest-63a3bb229a9ff288ab01e3e80c8477da5e84ee1e.zip
Changes to static object storage limit and error message
Move static object storage force-delete message from errorstream to warningstream. Increase 'max objects per block' setting to 64. Add missing spaces in warning code.
Diffstat (limited to 'src')
-rw-r--r--src/defaultsettings.cpp2
-rw-r--r--src/environment.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 522aa8481..a64840a8f 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -283,7 +283,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("time_send_interval", "5");
settings->setDefault("time_speed", "72");
settings->setDefault("server_unload_unused_data_timeout", "29");
- settings->setDefault("max_objects_per_block", "49");
+ settings->setDefault("max_objects_per_block", "64");
settings->setDefault("server_map_save_interval", "5.3");
settings->setDefault("chat_message_max_size", "500");
settings->setDefault("chat_message_limit_per_10sec", "8.0");
diff --git a/src/environment.cpp b/src/environment.cpp
index ceaf40d89..ecda1b6a4 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -2175,13 +2175,13 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
if(block)
{
- if(block->m_static_objects.m_stored.size() >= g_settings->getU16("max_objects_per_block")){
- errorstream<<"ServerEnv: Trying to store id="<<obj->getId()
- <<" statically but block "<<PP(blockpos)
- <<" already contains "
- <<block->m_static_objects.m_stored.size()
- <<" objects."
- <<" Forcing delete."<<std::endl;
+ if (block->m_static_objects.m_stored.size() >= g_settings->getU16("max_objects_per_block")) {
+ warningstream << "ServerEnv: Trying to store id = " << obj->getId()
+ << " statically but block " << PP(blockpos)
+ << " already contains "
+ << block->m_static_objects.m_stored.size()
+ << " objects."
+ << " Forcing delete." << std::endl;
force_delete = true;
} else {
// If static counterpart already exists in target block,