/*
=================
-GL_BeginRendering
-
+VID_GetWindowSize
=================
*/
-void GL_BeginRendering (int *x, int *y, int *width, int *height)
+void VID_GetWindowSize (int *x, int *y, int *width, int *height)
{
*x = *y = 0;
*width = scr_width;
*height = scr_height;
-
-// glViewport (*x, *y, *width, *height);
}
-
-void GL_EndRendering (void)
+void VID_Finish (void)
{
int usemouse;
- if (!r_render.integer)
- return;
- glFlush();
- glXSwapBuffers(vidx11_display, win);
+ if (r_render.integer)
+ {
+ glFinish();
+ glXSwapBuffers(vidx11_display, win);
+ }
// handle the mouse state when windowed if that's changed
usemouse = false;
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;
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);
}