summaryrefslogtreecommitdiff
path: root/src/clientiface.cpp
diff options
context:
space:
mode:
authorRogier-5 <rogier777@gmail.com>2016-11-11 09:30:37 +0100
committerZeno- <kde.psych@gmail.com>2016-11-11 18:30:37 +1000
commitb98f98b367f2c55d5a0bff4bafaaa183b3746403 (patch)
treec76817eb29ffc8ec633888a834cfeeef5f890c84 /src/clientiface.cpp
parent7e17eaedb2e697581ace1bd038781f908e19a985 (diff)
downloadminetest-b98f98b367f2c55d5a0bff4bafaaa183b3746403.tar.gz
minetest-b98f98b367f2c55d5a0bff4bafaaa183b3746403.tar.bz2
minetest-b98f98b367f2c55d5a0bff4bafaaa183b3746403.zip
Fix incorrect distance computation for visible blocks (#4765)
The client would not compute the distance from the camera to to a mapblock correctly. The result was that blocks that were in view (i.e. not beyond the fog limit) would not be rendered. With the improved distance computation, a range adjustment that existed in clientiface.cpp is no longer required.
Diffstat (limited to 'src/clientiface.cpp')
-rw-r--r--src/clientiface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clientiface.cpp b/src/clientiface.cpp
index 7e75c69a4..bdc16f31c 100644
--- a/src/clientiface.cpp
+++ b/src/clientiface.cpp
@@ -175,7 +175,7 @@ void RemoteClient::GetNextBlocks (
const s16 full_d_max = g_settings->getS16("max_block_send_distance");
const s16 d_opt = g_settings->getS16("block_send_optimize_distance");
- const s16 d_blocks_in_sight = (full_d_max + 1) * BS * MAP_BLOCKSIZE;
+ const s16 d_blocks_in_sight = full_d_max * BS * MAP_BLOCKSIZE;
s16 d_max = full_d_max;
s16 d_max_gen = g_settings->getS16("max_block_generate_distance");