mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-17 17:08:39 +00:00
Use server's zoom fov for distant world loading.
This commit is contained in:
parent
935f11a602
commit
a1868e8f6c
2 changed files with 6 additions and 17 deletions
|
@ -168,7 +168,7 @@ s16 adjustDist(s16 dist, float zoom_fov)
|
|||
// 1.775 ~= 72 * PI / 180 * 1.4, the default FOV on the client.
|
||||
// The heuristic threshold for zooming is half of that.
|
||||
static constexpr const float threshold_fov = 1.775f / 2.0f;
|
||||
if (zoom_fov > threshold_fov)
|
||||
if (zoom_fov < 0.001f || zoom_fov > threshold_fov)
|
||||
return dist;
|
||||
|
||||
return std::round(dist * std::cbrt((1.0f - std::cos(threshold_fov)) /
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue