]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_screen.c
added viewzoom extension to QC and client (smooth sniper zooming, with sensitivity...
[xonotic/darkplaces.git] / cl_screen.c
index 0586a6768456f51b0fba988416410a39ed89adb9..8f2f269d9c919c887ddccd50eccffe5f136c756c 100644 (file)
@@ -736,7 +736,8 @@ static void SCR_CalcRefdef (void)
        r_refdef.x = bound(0, r_refdef.x, vid.realwidth - r_refdef.width) + vid.realx;
        r_refdef.y = bound(0, r_refdef.y, vid.realheight - r_refdef.height) + vid.realy;
 
        r_refdef.x = bound(0, r_refdef.x, vid.realwidth - r_refdef.width) + vid.realx;
        r_refdef.y = bound(0, r_refdef.y, vid.realheight - r_refdef.height) + vid.realy;
 
-       r_refdef.fov_x = scr_fov.value;
+       // LordHavoc: viewzoom (zoom in for sniper rifles, etc)
+       r_refdef.fov_x = scr_fov.value * cl.viewzoom;
        r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.width, r_refdef.height);
 
        if (cl.worldmodel)
        r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.width, r_refdef.height);
 
        if (cl.worldmodel)