r160 - in trunk/code: client unix
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Oct 14 18:58:29 EDT 2005
Author: tma
Date: 2005-10-14 18:58:28 -0400 (Fri, 14 Oct 2005)
New Revision: 160
Modified:
trunk/code/client/cl_input.c
trunk/code/client/cl_main.c
trunk/code/client/client.h
trunk/code/unix/linux_glimp.c
trunk/code/unix/sdl_glimp.c
Log:
* Removed hard coded mouse acceleration in the unix build(s)
* Added CVAR_ROM cl_platformSensitivity to normalise the scale
of cl_sensitivity across platforms
Modified: trunk/code/client/cl_input.c
===================================================================
--- trunk/code/client/cl_input.c 2005-10-14 20:50:01 UTC (rev 159)
+++ trunk/code/client/cl_input.c 2005-10-14 22:58:28 UTC (rev 160)
@@ -435,7 +435,8 @@
cl.mouseDy[cl.mouseIndex] = 0;
rate = sqrt( mx * mx + my * my ) / (float)frame_msec;
- accelSensitivity = cl_sensitivity->value + rate * cl_mouseAccel->value;
+ accelSensitivity = ( cl_sensitivity->value *
+ cl_platformSensitivity->value ) + rate * cl_mouseAccel->value;
// scale by FOV
accelSensitivity *= cl.cgameSensitivity;
Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c 2005-10-14 20:50:01 UTC (rev 159)
+++ trunk/code/client/cl_main.c 2005-10-14 22:58:28 UTC (rev 160)
@@ -48,6 +48,7 @@
cvar_t *cl_freelook;
cvar_t *cl_sensitivity;
+cvar_t *cl_platformSensitivity;
cvar_t *cl_mouseAccel;
cvar_t *cl_showMouseRate;
@@ -2307,6 +2308,7 @@
cl_run = Cvar_Get ("cl_run", "1", CVAR_ARCHIVE);
cl_sensitivity = Cvar_Get ("sensitivity", "5", CVAR_ARCHIVE);
+ cl_platformSensitivity = Cvar_Get ("cl_platformSensitivity", "1.0", CVAR_ROM);
cl_mouseAccel = Cvar_Get ("cl_mouseAccel", "0", CVAR_ARCHIVE);
cl_freelook = Cvar_Get( "cl_freelook", "1", CVAR_ARCHIVE );
Modified: trunk/code/client/client.h
===================================================================
--- trunk/code/client/client.h 2005-10-14 20:50:01 UTC (rev 159)
+++ trunk/code/client/client.h 2005-10-14 22:58:28 UTC (rev 160)
@@ -330,6 +330,7 @@
extern cvar_t *cl_anglespeedkey;
extern cvar_t *cl_sensitivity;
+extern cvar_t *cl_platformSensitivity;
extern cvar_t *cl_freelook;
extern cvar_t *cl_mouseAccel;
Modified: trunk/code/unix/linux_glimp.c
===================================================================
--- trunk/code/unix/linux_glimp.c 2005-10-14 20:50:01 UTC (rev 159)
+++ trunk/code/unix/linux_glimp.c 2005-10-14 22:58:28 UTC (rev 160)
@@ -573,14 +573,8 @@
{
if (in_dgamouse->value)
{
- if (abs(event.xmotion.x_root) > 1)
- mx += event.xmotion.x_root * 2;
- else
- mx += event.xmotion.x_root;
- if (abs(event.xmotion.y_root) > 1)
- my += event.xmotion.y_root * 2;
- else
- my += event.xmotion.y_root;
+ mx += event.xmotion.x_root;
+ my += event.xmotion.y_root;
if (t - mouseResetTime > MOUSE_RESET_DELAY )
{
Sys_QueEvent( t, SE_MOUSE, mx, my, 0, NULL );
@@ -604,14 +598,8 @@
dx = ((int)event.xmotion.x - mwx);
dy = ((int)event.xmotion.y - mwy);
- if (abs(dx) > 1)
- mx += dx * 2;
- else
- mx += dx;
- if (abs(dy) > 1)
- my += dy * 2;
- else
- my += dy;
+ mx += dx;
+ my += dy;
mwx = event.xmotion.x;
mwy = event.xmotion.y;
@@ -1725,6 +1713,8 @@
in_joystickDebug = Cvar_Get ("in_debugjoystick", "0", CVAR_TEMP);
joy_threshold = Cvar_Get ("joy_threshold", "0.15", CVAR_ARCHIVE); // FIXME: in_joythreshold
+ Cvar_Set( "cl_platformSensitivity", "2.0" );
+
if (in_mouse->value)
mouse_avail = qtrue;
else
Modified: trunk/code/unix/sdl_glimp.c
===================================================================
--- trunk/code/unix/sdl_glimp.c 2005-10-14 20:50:01 UTC (rev 159)
+++ trunk/code/unix/sdl_glimp.c 2005-10-14 22:58:28 UTC (rev 160)
@@ -320,10 +320,6 @@
case SDL_MOUSEMOTION:
if (mouse_active)
{
- if (abs(e.motion.xrel) > 1)
- e.motion.xrel *= 2;
- if (abs(e.motion.yrel) > 1)
- e.motion.yrel *= 2;
Sys_QueEvent( t, SE_MOUSE, e.motion.xrel, e.motion.yrel, 0, NULL );
}
break;
@@ -1204,6 +1200,8 @@
in_joystickDebug = Cvar_Get ("in_debugjoystick", "0", CVAR_TEMP);
joy_threshold = Cvar_Get ("joy_threshold", "0.15", CVAR_ARCHIVE); // FIXME: in_joythreshold
+ Cvar_Set( "cl_platformSensitivity", "2.0" );
+
if (in_mouse->value)
mouse_avail = qtrue;
else
More information about the quake3-commits
mailing list