From b4c007778cab749e9d163baec64d22349435ea3f Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 12 Dec 2010 01:55:36 +0100 Subject: fixed that IntersectCharacter picks the character which is closest to the start point and within the radius --- src/game/server/gameworld.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/game') diff --git a/src/game/server/gameworld.cpp b/src/game/server/gameworld.cpp index 6a66d526..e2d08ed6 100644 --- a/src/game/server/gameworld.cpp +++ b/src/game/server/gameworld.cpp @@ -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; -- cgit 1.4.1