mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 04:31:09 +00:00
Don't screw up if 'sensitivity' is set to non-integral values.
Like most other cvars 'sensitivity' allowes for float values. But until now mouse events were handled as integers which led to some confusing problems. This was especially noticeable at values lower than 1, small mouse movements were cut to 0 and discarded. Since the clients movement code is written in floats and we're already using floats for joystick movement switch the mouse event handling over to them, too. This should have any impact on configs were 'sensitivity' is ste to integral values. If it was set to decimal values the behaviour is now correct. This fixes #419.
This commit is contained in:
parent
e3d4038233
commit
eaa4aa46ce
1 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@
|
|||
// These are used to communicate the events collected by
|
||||
// IN_Update() called at the beginning of a frame to the
|
||||
// actual movement functions called at a later time.
|
||||
static int mouse_x, mouse_y;
|
||||
static float mouse_x, mouse_y;
|
||||
static int back_button_id = -1;
|
||||
static float joystick_yaw, joystick_pitch;
|
||||
static float joystick_forwardmove, joystick_sidemove;
|
||||
|
@ -717,8 +717,8 @@ In_FlushQueue(void)
|
|||
void
|
||||
IN_Move(usercmd_t *cmd)
|
||||
{
|
||||
static int old_mouse_x;
|
||||
static int old_mouse_y;
|
||||
static float old_mouse_x;
|
||||
static float old_mouse_y;
|
||||
|
||||
if (m_filter->value)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue