Skip to content

Commit 3f56060

Browse files
check los slightly above ground
this matches code used for blink
1 parent c23638a commit 3f56060

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/game/Maps/PathFinder.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,12 +1109,20 @@ void PathInfo::CutPathWithDynamicLoS()
11091109
Vector3 out;
11101110
// We have always keep at least 2 points (else, there is no mvt !)
11111111
for (uint32 i = 1; i <= maxIndex; ++i)
1112-
if (m_sourceUnit->GetMap()->GetDynamicObjectHitPos(m_pathPoints[i - 1], m_pathPoints[i], out, -0.1f))
1112+
{
1113+
Vector3 start = m_pathPoints[i - 1];
1114+
Vector3 end = m_pathPoints[i];
1115+
start.z += 1.0f;
1116+
end.z += 1.0f;
1117+
1118+
if (m_sourceUnit->GetMap()->GetDynamicObjectHitPos(start, end, out, -0.1f))
11131119
{
1120+
out.z -= 1.0f;
11141121
m_pathPoints[i] = out;
11151122
m_pathPoints.resize(i + 1);
11161123
break;
11171124
}
1125+
}
11181126
}
11191127

11201128
float PathInfo::Length() const

0 commit comments

Comments
 (0)