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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user