allow freecam to center on world border

fixes #4953
This commit is contained in:
c0d3d3v 2022-04-09 15:24:57 +02:00
parent 00dbf3d2e1
commit aeaaa67581
No known key found for this signature in database
GPG key ID: 068AF680530DFF31

View file

@ -561,8 +561,8 @@ void CControls::ClampMousePos()
{
if(m_pClient->m_Snap.m_SpecInfo.m_Active && m_pClient->m_Snap.m_SpecInfo.m_SpectatorID < 0)
{
m_MousePos[g_Config.m_ClDummy].x = clamp(m_MousePos[g_Config.m_ClDummy].x, 200.0f, Collision()->GetWidth() * 32 - 200.0f);
m_MousePos[g_Config.m_ClDummy].y = clamp(m_MousePos[g_Config.m_ClDummy].y, 200.0f, Collision()->GetHeight() * 32 - 200.0f);
m_MousePos[g_Config.m_ClDummy].x = clamp(m_MousePos[g_Config.m_ClDummy].x, 0.0f, Collision()->GetWidth() * 32.0f);
m_MousePos[g_Config.m_ClDummy].y = clamp(m_MousePos[g_Config.m_ClDummy].y, 0.0f, Collision()->GetHeight() * 32.0f);
}
else
{