]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_glx.c
darkplaces now compiles in mingw
[xonotic/darkplaces.git] / vid_glx.c
index 3fc5efb1b5aa7a7fb0d80df0d1e6c1e556371db0..5fa9867b6ec74b5c0ee2dcf8019a0e8f8e363f88 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -849,8 +849,9 @@ void IN_MouseMove (usercmd_t *cmd)
                old_mouse_y = mouse_y;
        }
 
-       mouse_x *= sensitivity.value;
-       mouse_y *= sensitivity.value;
+       // LordHavoc: viewzoom affects mouse sensitivity for sniping
+       mouse_x *= sensitivity.value * cl.viewzoom;
+       mouse_y *= sensitivity.value * cl.viewzoom;
 
        if (in_strafe.state & 1)
                cmd->sidemove += m_side.value * mouse_x;
@@ -861,10 +862,7 @@ void IN_MouseMove (usercmd_t *cmd)
                V_StopPitchDrift ();
 
        if (/*freelook && */!(in_strafe.state & 1))
-       {
                cl.viewangles[PITCH] += m_pitch.value * mouse_y;
-               cl.viewangles[PITCH] = bound (-90, cl.viewangles[PITCH], 90);
-       }
        else
        {
                if ((in_strafe.state & 1) && noclip_anglehack)
@@ -878,6 +876,7 @@ void IN_MouseMove (usercmd_t *cmd)
 void IN_Move (usercmd_t *cmd)
 {
        IN_MouseMove(cmd);
+       cl.viewangles[PITCH] = bound (in_pitch_min.value, cl.viewangles[PITCH], in_pitch_max.value);
 }