joystick/mouse turning speed patch
Geller Sandor
wildy at petra.hos.u-szeged.hu
Sat Apr 23 12:37:41 EDT 2005
Hi,
Attached is a patch which brings joystick and mouse turning speed par with
the keyboard. I'm not sure whether this patch is correct or not... (If I
understood the code correctly, then the joystick delta is between 0 and
32767 - 0 means leftern position, 32768 is the center and 65535 is the
rightern position, so the max delta from the center is 32767 - but
the code normalizes this with dividing by 65536, which gives only the half
of the correct value.)
Regards,
Geller Sandor <wildy at petra.hos.u-szeged.hu>
-------------- next part --------------
--- src/playerman/playercontrol.cpp-orig 2004-07-17 07:34:23.000000000 +0200
+++ src/playerman/playercontrol.cpp 2005-04-23 18:20:03.000000000 +0200
@@ -967,20 +967,20 @@
if (Axis_map_to[JOY_HEADING_AXIS] >= 0) {
// check the heading on the x axis
if ( check_control(BANK_WHEN_PRESSED) ) {
- delta = f2fl( axis[JOY_HEADING_AXIS] );
+ delta = f2fl( axis[JOY_HEADING_AXIS] * 2.0f );
if ( (delta > 0.05f) || (delta < -0.05f) ) {
ci->bank -= delta;
ignore_pitch = TRUE;
}
} else {
- ci->heading += f2fl( axis[JOY_HEADING_AXIS] );
+ ci->heading += f2fl( axis[JOY_HEADING_AXIS] * 2.0f );
}
}
// check the pitch on the y axis
if (Axis_map_to[JOY_PITCH_AXIS] >= 0)
- ci->pitch -= f2fl( axis[JOY_PITCH_AXIS] );
+ ci->pitch -= f2fl( axis[JOY_PITCH_AXIS] * 2.0f);
if (Axis_map_to[JOY_BANK_AXIS] >= 0) {
ci->bank -= f2fl( axis[JOY_BANK_AXIS] ) * 1.5f;
More information about the freespace2
mailing list