1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-21 08:55:21 +01:00

Tune "block send throttling while building" optimization (#16614)

it can lead to terrain not loading/updating at all if you're constantly building and moving.

for more see the IRC logs <https://irc.luanti.org/luanti/2025-10-26#i_6293100>
This commit is contained in:
sfan5
2025-11-04 11:44:49 +01:00
committed by GitHub
parent 8350fb734a
commit 7a6e639d61
5 changed files with 29 additions and 30 deletions

View File

@@ -100,7 +100,7 @@ bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir,
v3f blockpos_relative = blockpos - camera_pos;
// Total distance
f32 d = MYMAX(0, blockpos_relative.getLength() - BLOCK_MAX_RADIUS);
f32 d = std::max(0.0f, blockpos_relative.getLength() - BLOCK_MAX_RADIUS);
if (distance_ptr)
*distance_ptr = d;