fix the linux-specific input/csqc weirdness that gb reported

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4086 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2012-07-21 05:21:06 +00:00
parent f15532d525
commit e6f3e0d019

View file

@ -1112,16 +1112,15 @@ void IN_MouseMove (float *movements, int pnum)
}
#endif
}
else
{
#ifdef PEXT_CSQC
if (CSQC_MouseMove(mx, my, 0))
{
mx = 0;
my = 0;
}
#endif
if (mx || my)
if (CSQC_MouseMove(mx, my, 0))
{
mx = 0;
my = 0;
}
#endif
if (m_filter.value)
{
@ -1129,14 +1128,22 @@ void IN_MouseMove (float *movements, int pnum)
mouse_x = (mouse_x*(1-fraction) + old_mouse_x*fraction);
mouse_y = (mouse_y*(1-fraction) + old_mouse_y*fraction);
}
else
{
mouse_x = mx;
mouse_y = my;
}
old_mouse_x = mx;
old_mouse_y = my;
if (m_accel.value) {
if (m_accel.value)
{
float mouse_deltadist = sqrt(mx*mx + my*my);
mouse_x *= (mouse_deltadist*m_accel.value + sensitivity.value*in_sensitivityscale);
mouse_y *= (mouse_deltadist*m_accel.value + sensitivity.value*in_sensitivityscale);
} else {
}
else
{
mouse_x *= sensitivity.value*in_sensitivityscale;
mouse_y *= sensitivity.value*in_sensitivityscale;
}