From a1868e8f6ca191edc03da342fd7c3088732e1b00 Mon Sep 17 00:00:00 2001 From: Lars Hofhansl Date: Tue, 15 May 2018 18:49:11 -0700 Subject: Use server's zoom fov for distant world loading. --- src/util/numeric.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') 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)) / -- cgit v1.2.3