summaryrefslogtreecommitdiff
path: root/src/clientiface.cpp
diff options
context:
space:
mode:
authorlhofhansl <lhofhansl@yahoo.com>2016-10-30 20:35:55 -0700
committerkwolekr <kwolekr@minetest.net>2016-10-30 23:35:55 -0400
commite1842ed370f7cab23e460979a08886b5df38e1b3 (patch)
treea16653ec6e2f9be8411dd1aa3ae629dd301de687 /src/clientiface.cpp
parent595932a8602292f28333ce14e20cee4b6d8820c1 (diff)
downloadminetest-e1842ed370f7cab23e460979a08886b5df38e1b3.tar.gz
minetest-e1842ed370f7cab23e460979a08886b5df38e1b3.tar.bz2
minetest-e1842ed370f7cab23e460979a08886b5df38e1b3.zip
Optionally disable optimization that causes underwater and cave rendering glitches. (#4686)
Diffstat (limited to 'src/clientiface.cpp')
-rw-r--r--src/clientiface.cpp4
1 files changed, 3 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;