Skip to content

Commit

Permalink
Zoom FOV: Reduce minimum zoom FOV to 7 degrees
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
paramat committed Jan 23, 2017
1 parent d413dfe commit 59fdf57
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion builtin/settingtypes.txt
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion minetest.conf.example
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions src/camera.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 59fdf57

Please sign in to comment.