mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Rename variable MDistance
to MouseDistance
This commit is contained in:
parent
f94053bd66
commit
01be442280
|
@ -414,18 +414,18 @@ void CControls::ClampMousePos()
|
|||
float MinDistance = g_Config.m_ClDyncam ? g_Config.m_ClDyncamMinDistance : g_Config.m_ClMouseMinDistance;
|
||||
float MouseMin = MinDistance;
|
||||
|
||||
float MDistance = length(m_aMousePos[g_Config.m_ClDummy]);
|
||||
if(MDistance < 0.001f)
|
||||
float MouseDistance = length(m_aMousePos[g_Config.m_ClDummy]);
|
||||
if(MouseDistance < 0.001f)
|
||||
{
|
||||
m_aMousePos[g_Config.m_ClDummy].x = 0.001f;
|
||||
m_aMousePos[g_Config.m_ClDummy].y = 0;
|
||||
MDistance = 0.001f;
|
||||
MouseDistance = 0.001f;
|
||||
}
|
||||
if(MDistance < MouseMin)
|
||||
m_aMousePos[g_Config.m_ClDummy] = normalize_pre_length(m_aMousePos[g_Config.m_ClDummy], MDistance) * MouseMin;
|
||||
MDistance = length(m_aMousePos[g_Config.m_ClDummy]);
|
||||
if(MDistance > MouseMax)
|
||||
m_aMousePos[g_Config.m_ClDummy] = normalize_pre_length(m_aMousePos[g_Config.m_ClDummy], MDistance) * MouseMax;
|
||||
if(MouseDistance < MouseMin)
|
||||
m_aMousePos[g_Config.m_ClDummy] = normalize_pre_length(m_aMousePos[g_Config.m_ClDummy], MouseDistance) * MouseMin;
|
||||
MouseDistance = length(m_aMousePos[g_Config.m_ClDummy]);
|
||||
if(MouseDistance > MouseMax)
|
||||
m_aMousePos[g_Config.m_ClDummy] = normalize_pre_length(m_aMousePos[g_Config.m_ClDummy], MouseDistance) * MouseMax;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue