mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
fix: fixed missing TargetX/TargetY zoom scale apply in CControls::SnapInput
This commit is contained in:
parent
8dd2b6e9e6
commit
ddd13ba4fc
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue