Skip to content

Commit 59fdf57

Browse files
committedJan 23, 2017
Zoom FOV: Reduce minimum zoom FOV to 7 degrees
The default of 15 is unchanged. 7 degrees is x10 magnification which is common for binoculars. Alter hardcoded limits in camera.cpp: Minimum 7 degrees. Maximum 160 degrees to match upper limits in advanced settings.
1 parent d413dfe commit 59fdf57

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed
 

Diff for: ‎builtin/settingtypes.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ fov (Field of view) int 72 30 160
440440

441441
# Field of view while zooming in degrees.
442442
# This requires the "zoom" privilege on the server.
443-
zoom_fov (Field of view for zoom) int 15 15 160
443+
zoom_fov (Field of view for zoom) int 15 7 160
444444

445445
# Adjust the gamma encoding for the light tables. Higher numbers are brighter.
446446
# This setting is for the client only and is ignored by the server.

Diff for: ‎minetest.conf.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502

503503
# Field of view while zooming in degrees.
504504
# This requires the "zoom" privilege on the server.
505-
# type: int min: 15 max: 160
505+
# type: int min: 7 max: 160
506506
# zoom_fov = 15
507507

508508
# Adjust the gamma encoding for the light tables. Higher numbers are brighter.

Diff for: ‎src/camera.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime,
393393
} else {
394394
fov_degrees = m_cache_fov;
395395
}
396-
fov_degrees = MYMAX(fov_degrees, 10.0);
397-
fov_degrees = MYMIN(fov_degrees, 170.0);
396+
fov_degrees = rangelim(fov_degrees, 7.0, 160.0);
398397

399398
// FOV and aspect ratio
400399
m_aspect = (f32) porting::getWindowSize().X / (f32) porting::getWindowSize().Y;

0 commit comments

Comments
 (0)
Please sign in to comment.