mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Avoid short overflow with large viewing ranges (#14175)
This commit is contained in:
parent
32e492837c
commit
bc336480e6
1 changed files with 2 additions and 1 deletions
|
@ -228,7 +228,8 @@ void RemoteClient::GetNextBlocks (
|
||||||
wanted_range);
|
wanted_range);
|
||||||
const s16 d_cull_opt = std::min(adjustDist(m_block_cull_optimize_distance, prop_zoom_fov),
|
const s16 d_cull_opt = std::min(adjustDist(m_block_cull_optimize_distance, prop_zoom_fov),
|
||||||
wanted_range);
|
wanted_range);
|
||||||
const s16 d_blocks_in_sight = full_d_max * BS * MAP_BLOCKSIZE;
|
// f32 to prevent overflow, it is also what isBlockInSight(...) expects
|
||||||
|
const f32 d_blocks_in_sight = full_d_max * BS * MAP_BLOCKSIZE;
|
||||||
|
|
||||||
s16 d_max_gen = std::min(adjustDist(m_max_gen_distance, prop_zoom_fov),
|
s16 d_max_gen = std::min(adjustDist(m_max_gen_distance, prop_zoom_fov),
|
||||||
wanted_range);
|
wanted_range);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue