aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/settingtypes.txt2
-rw-r--r--minetest.conf.example2
-rw-r--r--src/camera.cpp3
3 files changed, 3 insertions, 4 deletions
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt
index 0f416bc9a..581eef315 100644
--- a/builtin/settingtypes.txt
+++ b/builtin/settingtypes.txt
@@ -440,7 +440,7 @@ fov (Field of view) int 72 30 160
# Field of view while zooming in degrees.
# This requires the "zoom" privilege on the server.
-zoom_fov (Field of view for zoom) int 15 15 160
+zoom_fov (Field of view for zoom) int 15 7 160
# Adjust the gamma encoding for the light tables. Higher numbers are brighter.
# This setting is for the client only and is ignored by the server.
diff --git a/minetest.conf.example b/minetest.conf.example
index 515b6cfd4..642b028c7 100644
--- a/minetest.conf.example
+++ b/minetest.conf.example
@@ -502,7 +502,7 @@
# Field of view while zooming in degrees.
# This requires the "zoom" privilege on the server.
-# type: int min: 15 max: 160
+# type: int min: 7 max: 160
# zoom_fov = 15
# Adjust the gamma encoding for the light tables. Higher numbers are brighter.
diff --git a/src/camera.cpp b/src/camera.cpp
index 2ad835817..a7679e43a 100644
--- a/src/camera.cpp
+++ b/src/camera.cpp
@@ -393,8 +393,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime,
} else {
fov_degrees = m_cache_fov;
}
- fov_degrees = MYMAX(fov_degrees, 10.0);
- fov_degrees = MYMIN(fov_degrees, 170.0);
+ fov_degrees = rangelim(fov_degrees, 7.0, 160.0);
// FOV and aspect ratio
m_aspect = (f32) porting::getWindowSize().X / (f32) porting::getWindowSize().Y;