- 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:
Christoph Oelckers 2020-08-29 18:37:22 +02:00
parent a03b6cf57c
commit e3839b01bc

View file

@ -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;