mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix cl_dyncam_mousesens
should only have an effect ingame, not in menus or editor
This commit is contained in:
parent
22ea30a7f5
commit
f05c56d6ce
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue