Fix cl_dyncam_mousesens

should only have an effect ingame, not in menus or editor
This commit is contained in:
def 2019-01-11 09:39:53 +01:00
parent 22ea30a7f5
commit f05c56d6ce
2 changed files with 6 additions and 1 deletions

View file

@ -71,7 +71,7 @@ void CInput::MouseRelative(float *x, float *y)
*y = ny;
#else
int nx = 0, ny = 0;
float Sens = ((g_Config.m_ClDyncam && g_Config.m_ClDyncamMousesens) ? g_Config.m_ClDyncamMousesens : g_Config.m_InpMousesens) / 100.0f;
float Sens = g_Config.m_InpMousesens / 100.0f;
SDL_GetRelativeMouseState(&nx,&ny);

View file

@ -511,6 +511,11 @@ bool CControls::OnMouseMove(float x, float y)
ClampMousePos();
}
#else
if(g_Config.m_ClDyncam && g_Config.m_ClDyncamMousesens)
{
x = x * g_Config.m_ClDyncamMousesens / g_Config.m_InpMousesens;
y = y * g_Config.m_ClDyncamMousesens / g_Config.m_InpMousesens;
}
m_MousePos[g_Config.m_ClDummy] += vec2(x, y); // TODO: ugly
ClampMousePos();
#endif