mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fixed that IntersectCharacter picks the character which is closest to the start point and within the radius
This commit is contained in:
parent
369e22cd4e
commit
b4c007778c
|
@ -188,6 +188,7 @@ CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, v
|
|||
float Len = distance(p->m_Pos, IntersectPos);
|
||||
if(Len < p->m_ProximityRadius+Radius)
|
||||
{
|
||||
Len = distance(Pos0, IntersectPos);
|
||||
if(Len < ClosestLen)
|
||||
{
|
||||
NewPos = IntersectPos;
|
||||
|
|
Loading…
Reference in a new issue