summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLars Hofhansl <larsh@apache.org>2018-05-15 18:49:11 -0700
committerLars Hofhansl <larsh@apache.org>2018-05-15 18:49:11 -0700
commita1868e8f6ca191edc03da342fd7c3088732e1b00 (patch)
tree16d8bc42e6e34b927a7f5d68d071e16868cfa585 /src/util
parent935f11a6024a12955517036db0dbee72990faf4c (diff)
downloadminetest-a1868e8f6ca191edc03da342fd7c3088732e1b00.tar.gz
minetest-a1868e8f6ca191edc03da342fd7c3088732e1b00.tar.bz2
minetest-a1868e8f6ca191edc03da342fd7c3088732e1b00.zip
Use server's zoom fov for distant world loading.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/numeric.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/numeric.cpp b/src/util/numeric.cpp
index 7264e5f89..d878a3f60 100644
--- a/src/util/numeric.cpp
+++ b/src/util/numeric.cpp
@@ -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)) /