From 5b6d2556633bb9f947acb6f3dc35f1deba9bd91b Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 13 Apr 2007 15:32:41 +0000 Subject: [PATCH] changed .viewzoom field to scale view frustum slopes rather than fov angle, this makes zooming more fluid and straightforward, and causes a 1 to 1 correspondence between the sensitivity decrease and the view size decrease git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7088 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cl_screen.c b/cl_screen.c index f7360f22..8483e196 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -1538,7 +1538,7 @@ void SCR_DrawScreen (void) // this it simply assumes the requested fov is the vertical fov // for a 4x3 display, if the ratio is not 4x3 this makes the fov // higher/lower according to the ratio - r_view.frustum_y = tan(scr_fov.value * cl.viewzoom * M_PI / 360.0) * (3.0/4.0); + r_view.frustum_y = tan(scr_fov.value * M_PI / 360.0) * (3.0/4.0) * cl.viewzoom; r_view.frustum_x = r_view.frustum_y * (float)r_view.width / (float)r_view.height / vid_pixelheight.value; r_view.frustum_x *= r_refdef.frustumscale_x; @@ -1558,7 +1558,7 @@ void SCR_DrawScreen (void) r_view.y = 0; r_view.z = 0; - r_view.frustum_y = tan(scr_zoomwindow_fov.value * cl.viewzoom * M_PI / 360.0) * (3.0/4.0); + r_view.frustum_y = tan(scr_zoomwindow_fov.value * M_PI / 360.0) * (3.0/4.0) * cl.viewzoom; r_view.frustum_x = r_view.frustum_y * vid_pixelheight.value * (float)r_view.width / (float)r_view.height; r_view.frustum_x *= r_refdef.frustumscale_x; -- 2.39.2