do not dragger beam snap, if the target is out of reach

This commit is contained in:
c0d3d3v 2022-05-25 16:43:05 +02:00
parent cc3ea78fcd
commit 82a0354f97
No known key found for this signature in database
GPG key ID: 068AF680530DFF31

View file

@ -87,7 +87,7 @@ void CDraggerBeam::Snap(int SnappingClient)
}
// Only players with the dragger beam in their field of view or who want to see everything will receive the snap
vec2 TargetPos = vec2(pTarget->m_Pos.x, pTarget->m_Pos.y);
if(NetworkClippedLine(SnappingClient, m_Pos, TargetPos))
if(distance(pTarget->m_Pos, m_Pos) >= g_Config.m_SvDraggerRange || NetworkClippedLine(SnappingClient, m_Pos, TargetPos))
{
return;
}