diff options
Diffstat (limited to 'src/clientiface.cpp')
-rw-r--r-- | src/clientiface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/clientiface.cpp b/src/clientiface.cpp index 0eb68c9c1..76a34c392 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -197,6 +197,9 @@ void RemoteClient::GetNextBlocks ( s32 nearest_sent_d = -1; //bool queue_is_full = false; + const v3s16 cam_pos_nodes = floatToInt(camera_pos, BS); + const bool occ_cull = g_settings->getBool("server_side_occlusion_culling"); + s16 d; for(d = d_start; d <= d_max; d++) { /* @@ -298,6 +301,11 @@ void RemoteClient::GetNextBlocks ( if(block->getDayNightDiff() == false) continue; } + + if (occ_cull && !block_is_invalid && + env->getMap().isBlockOccluded(block, cam_pos_nodes)) { + continue; + } } /* |