aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clientiface.cpp4
-rw-r--r--src/defaultsettings.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/clientiface.cpp b/src/clientiface.cpp
index d2e3a6da0..7dce77cd7 100644
--- a/src/clientiface.cpp
+++ b/src/clientiface.cpp
@@ -174,6 +174,8 @@ void RemoteClient::GetNextBlocks (
s32 new_nearest_unsent_d = -1;
const s16 full_d_max = g_settings->getS16("max_block_send_distance");
+ const s16 d_opt = g_settings->getS16("block_send_optimize_distance");
+
s16 d_max = full_d_max;
s16 d_max_gen = g_settings->getS16("max_block_generate_distance");
@@ -300,7 +302,7 @@ void RemoteClient::GetNextBlocks (
Block is near ground level if night-time mesh
differs from day-time mesh.
*/
- if(d >= 4)
+ if(d >= d_opt)
{
if(block->getDayNightDiff() == false)
continue;
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index a64840a8f..2cb57532d 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -279,6 +279,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("max_simultaneous_block_sends_server_total", "40");
settings->setDefault("max_block_send_distance", "9");
settings->setDefault("max_block_generate_distance", "7");
+ settings->setDefault("block_send_optimize_distance", "4");
settings->setDefault("max_clearobjects_extra_loaded_blocks", "4096");
settings->setDefault("time_send_interval", "5");
settings->setDefault("time_speed", "72");