]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed .viewzoom field to scale view frustum slopes rather than fov
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 13 Apr 2007 15:32:41 +0000 (15:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 13 Apr 2007 15:32:41 +0000 (15:32 +0000)
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

index f7360f22767ce31da432fe1947caadcf742d834e..8483e1966e8dbe452d5b2d72cbbe098b55d7037d 100644 (file)
@@ -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;