mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Merge pull request #8766 from Matodor/pr_inputs_missing_zoom_scale
Fixed missing TargetX/TargetY zoom scale apply in CControls::SnapInput
This commit is contained in:
commit
89cc2d46a8
|
@ -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_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;
|
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 once a second just to be sure
|
||||||
Send = Send || time_get() > m_LastSendTime + time_freq();
|
Send = Send || time_get() > m_LastSendTime + time_freq();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue