fix: fixed missing TargetX/TargetY zoom scale apply in CControls::SnapInput

This commit is contained in:
Matodor 2024-08-19 00:52:36 +05:00
parent 8dd2b6e9e6
commit ddd13ba4fc

View file

@ -211,6 +211,13 @@ int CControls::SnapInput(int *pData)
m_aInputData[g_Config.m_ClDummy].m_TargetX = (int)m_aMousePos[g_Config.m_ClDummy].x;
m_aInputData[g_Config.m_ClDummy].m_TargetY = (int)m_aMousePos[g_Config.m_ClDummy].y;
// scale TargetX, TargetY by zoom.
if(!m_pClient->m_Snap.m_SpecInfo.m_Active)
{
m_aInputData[g_Config.m_ClDummy].m_TargetX *= m_pClient->m_Camera.m_Zoom;
m_aInputData[g_Config.m_ClDummy].m_TargetY *= m_pClient->m_Camera.m_Zoom;
}
// send once a second just to be sure
Send = Send || time_get() > m_LastSendTime + time_freq();
}