Changes to static object storage limit and error message
authorparamat <mat.gregory@virginmedia.com>
Wed, 19 Oct 2016 00:37:12 +0000 (01:37 +0100)
committerparamat <mat.gregory@virginmedia.com>
Thu, 20 Oct 2016 02:40:47 +0000 (03:40 +0100)
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.

builtin/settingtypes.txt
minetest.conf.example
src/defaultsettings.cpp
src/environment.cpp

index 9b5f386e0b10baabb583fb104b9540f550165f4e..492d7c79dae798aa6a007c4c411671fe02277c96 100644 (file)
@@ -817,7 +817,7 @@ max_clearobjects_extra_loaded_blocks (Max. clearobjects extra blocks) int 4096
 server_unload_unused_data_timeout (Unload unused server data) int 29
 
 #    Maximum number of statically stored objects in a block.
-max_objects_per_block (Maximum objects per block) int 49
+max_objects_per_block (Maximum objects per block) int 64
 
 #    See http://www.sqlite.org/pragma.html#pragma_synchronous
 sqlite_synchronous (Synchronous SQLite) enum 2 0,1,2
index e24d3a384d89080dd67e320e4a2d933b84e32f91..b7d705bac3ed9350fba647d4de7869b9b63f75e9 100644 (file)
 
 #    Maximum number of statically stored objects in a block.
 #    type: int
-# max_objects_per_block = 49
+# max_objects_per_block = 64
 
 #    See http://www.sqlite.org/pragma.html#pragma_synchronous
 #    type: enum values: 0, 1, 2
index 522aa848107fae0bf5c568753e2e2eaa805919b0..a64840a8fde68de9532de8cfb4cc750a643e103f 100644 (file)
@@ -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");
index ceaf40d8992429849e9ec5b34b174467f814572d..ecda1b6a445e12709bf549aa4c33ce2cc5563df9 100644 (file)
@@ -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,