// LordHavoc: changed limits on pitch from -70 to 80, to -90 to 90
if (mouselook && !(in_strafe.state & 1))
- {
cl.viewangles[PITCH] += m_pitch.value * mouse_y;
- if (cl.viewangles[PITCH] > 90)
- cl.viewangles[PITCH] = 90;
- if (cl.viewangles[PITCH] < -90)
- cl.viewangles[PITCH] = -90;
- }
else
{
if ((in_strafe.state & 1) && noclip_anglehack)
else
cmd->forwardmove -= m_forward.value * mouse_y;
}
+ cl.viewangles[PITCH] = bound (in_pitch_min.value, cl.viewangles[PITCH], in_pitch_max.value);
}
void IN_HandlePause (qboolean pause)
// LordHavoc: changed limits on pitch from -70 to 80, to -90 to 90
if (mouselook && !(in_strafe.state & 1))
- {
cl.viewangles[PITCH] += m_pitch.value * mouse_y;
- if (cl.viewangles[PITCH] > 90)
- cl.viewangles[PITCH] = 90;
- if (cl.viewangles[PITCH] < -90)
- cl.viewangles[PITCH] = -90;
- }
else
{
if ((in_strafe.state & 1) && noclip_anglehack)
*/
void IN_Move (usercmd_t *cmd)
{
-
if (ActiveApp && !Minimized)
{
IN_MouseMove (cmd);
IN_JoyMove (cmd);
}
+
+ cl.viewangles[PITCH] = bound (in_pitch_min.value, cl.viewangles[PITCH], in_pitch_max.value);
}
extern cvar_t vid_mouse;
extern cvar_t vid_fullscreen;
+extern cvar_t in_pitch_min;
+extern cvar_t in_pitch_max;
+
void VID_InitCvars(void);
void GL_Init (void);
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)
void IN_Move (usercmd_t *cmd)
{
IN_MouseMove(cmd);
+ cl.viewangles[PITCH] = bound (in_pitch_min.value, cl.viewangles[PITCH], in_pitch_max.value);
}
cvar_t vid_fullscreen = {0, "vid_fullscreen", "1"};
cvar_t gl_combine = {0, "gl_combine", "1"};
+cvar_t in_pitch_min = {0, "in_pitch_min", "-90"};
+cvar_t in_pitch_max = {0, "in_pitch_max", "90"};
+
// GL_ARB_multitexture
void (GLAPIENTRY *qglMultiTexCoord2f) (GLenum, GLfloat, GLfloat);
void (GLAPIENTRY *qglActiveTexture) (GLenum);
Cvar_RegisterVariable(&vid_mouse);
Cvar_RegisterVariable(&vid_fullscreen);
Cvar_RegisterVariable(&gl_combine);
+ Cvar_RegisterVariable(&in_pitch_min);
+ Cvar_RegisterVariable(&in_pitch_max);
Cmd_AddCommand("force_centerview", Force_CenterView_f);
}