mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- removed in_mousesmoothing.
This not only was redundant with m_filter, even worse, it was in the wrong place. Control_GetInput is used to read the current input state from the backend and can get called at uneven intervals, or even multiple times during the same frame, so smoothing the movement here can lead to erratic behavior. With this change CONTROL_GetInput will return the same data unless it gets updated between calls.
This commit is contained in:
parent
a03b6cf57c
commit
e3839b01bc
1 changed files with 1 additions and 14 deletions
|
@ -55,22 +55,9 @@ bool sendPause;
|
|||
|
||||
void InputState::GetMouseDelta(ControlInfo * info)
|
||||
{
|
||||
vec2f_t input, finput;
|
||||
|
||||
input = g_mousePos;
|
||||
vec2f_t finput = g_mousePos;
|
||||
g_mousePos = {};
|
||||
|
||||
if (in_mousesmoothing)
|
||||
{
|
||||
static vec2f_t last;
|
||||
finput = { (input.x + last.x) * 0.5f, (input.y + last.y) * 0.5f };
|
||||
last = input;
|
||||
}
|
||||
else
|
||||
{
|
||||
finput = { input.x, input.y };
|
||||
}
|
||||
|
||||
info->mousex = finput.x * (16.f / 32.f) * in_mousesensitivity * in_mousescalex / 3.f;
|
||||
info->mousey = finput.y * (16.f / 64.f) * in_mousesensitivity * in_mousescaley;
|
||||
|
||||
|
|
Loading…
Reference in a new issue