diff options
author | paramat <mat.gregory@virginmedia.com> | 2017-01-22 04:21:29 +0000 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-01-23 07:39:58 +0000 |
commit | 59fdf57134f62be8b8b4801c5f0fc4a2fca25f43 (patch) | |
tree | 23c23af9dbb30cf3d26fde98bbed0e8961fc92f4 /src | |
parent | d413dfe87c326385be4259afc2830e3e1638bf3c (diff) | |
download | minetest-59fdf57134f62be8b8b4801c5f0fc4a2fca25f43.tar.gz minetest-59fdf57134f62be8b8b4801c5f0fc4a2fca25f43.tar.bz2 minetest-59fdf57134f62be8b8b4801c5f0fc4a2fca25f43.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/camera.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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; |