1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

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.
This commit is contained in:
Rogier-5 2016-11-11 09:30:37 +01:00 committed by Zeno-
parent 7e17eaedb2
commit b98f98b367
2 changed files with 9 additions and 8 deletions

View file

@ -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");