mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34: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);
|
float Len = distance(p->m_Pos, IntersectPos);
|
||||||
if(Len < p->m_ProximityRadius+Radius)
|
if(Len < p->m_ProximityRadius+Radius)
|
||||||
{
|
{
|
||||||
|
Len = distance(Pos0, IntersectPos);
|
||||||
if(Len < ClosestLen)
|
if(Len < ClosestLen)
|
||||||
{
|
{
|
||||||
NewPos = IntersectPos;
|
NewPos = IntersectPos;
|
||||||
|
|
Loading…
Reference in a new issue