]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_glx.c
added in_pitch_min and in_pitch_max cvars to limit pitch (default: -90 to +90)
[xonotic/darkplaces.git] / vid_glx.c
index 8124ed710a69ae703e85770c0b5bbe62b9bcbaae..5fa9867b6ec74b5c0ee2dcf8019a0e8f8e363f88 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -862,10 +862,7 @@ void IN_MouseMove (usercmd_t *cmd)
                V_StopPitchDrift ();
 
        if (/*freelook && */!(in_strafe.state & 1))
                V_StopPitchDrift ();
 
        if (/*freelook && */!(in_strafe.state & 1))
-       {
                cl.viewangles[PITCH] += m_pitch.value * mouse_y;
                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)
        else
        {
                if ((in_strafe.state & 1) && noclip_anglehack)
@@ -879,6 +876,7 @@ void IN_MouseMove (usercmd_t *cmd)
 void IN_Move (usercmd_t *cmd)
 {
        IN_MouseMove(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);
 }
 
 
 }