X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=vid_glx.c;h=bb42edca32006906e35fa9a36ca37f90e3b0a947;hb=929f9a6fe217e9c8ca40a68a5229b08400233946;hp=5fa9867b6ec74b5c0ee2dcf8019a0e8f8e363f88;hpb=241f521388f39d8145d5036ebb1969baaf98006d;p=xonotic%2Fdarkplaces.git diff --git a/vid_glx.c b/vid_glx.c index 5fa9867b..bb42edca 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -55,12 +55,10 @@ static qboolean mouse_avail = true; static qboolean mouse_active = false, usingmouse = false; // static qboolean dga_active; static float mouse_x, mouse_y; -static float old_mouse_x, old_mouse_y; static int p_mouse_x, p_mouse_y; cvar_t vid_dga = {CVAR_SAVE, "vid_dga", "1"}; cvar_t vid_dga_mouseaccel = {0, "vid_dga_mouseaccel", "1"}; -cvar_t m_filter = {0, "m_filter", "0"}; qboolean vidmode_ext = false; @@ -78,8 +76,6 @@ static Colormap vidx11_colormap; /*-----------------------------------------------------------------------*/ -float gldepthmin, gldepthmax; - const char *gl_vendor; const char *gl_renderer; const char *gl_version; @@ -493,7 +489,7 @@ void VID_Finish (void) int usemouse; if (r_render.integer) { - glFinish(); + qglFinish(); glXSwapBuffers(vidx11_display, win); } @@ -635,7 +631,6 @@ void VID_Init(void) Cvar_RegisterVariable (&vid_dga); Cvar_RegisterVariable (&vid_dga_mouseaccel); - Cvar_RegisterVariable (&m_filter); // interpret command-line params @@ -830,53 +825,12 @@ void IN_Commands (void) { } -/* -=========== -IN_Move -=========== -*/ -void IN_MouseMove (usercmd_t *cmd) -{ - if (!mouse_avail) - return; - - if (m_filter.integer) - { - mouse_x = (mouse_x + old_mouse_x) * 0.5; - mouse_y = (mouse_y + old_mouse_y) * 0.5; - - old_mouse_x = mouse_x; - old_mouse_y = mouse_y; - } - - // 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; - else - cl.viewangles[YAW] -= m_yaw.value * mouse_x; - - //if (freelook) - V_StopPitchDrift (); - - if (/*freelook && */!(in_strafe.state & 1)) - cl.viewangles[PITCH] += m_pitch.value * mouse_y; - else - { - if ((in_strafe.state & 1) && noclip_anglehack) - cmd->upmove -= m_forward.value * mouse_y; - else - cmd->forwardmove -= m_forward.value * mouse_y; - } - mouse_x = mouse_y = 0.0; -} - void IN_Move (usercmd_t *cmd) { - IN_MouseMove(cmd); - cl.viewangles[PITCH] = bound (in_pitch_min.value, cl.viewangles[PITCH], in_pitch_max.value); + if (mouse_avail) + IN_Mouse(cmd, mouse_x, mouse_y); + mouse_x = 0; + mouse_y = 0; }