Core/MMaps: Handle path on same position
Port From (https://github.com/TrinityCore/TrinityCore/commit/0ed58b09526c5c0b8670348f4b72491852c2f1eb)
This commit is contained in:
@@ -522,7 +522,14 @@ namespace Game.Movement
|
|||||||
_pointPathLimit); // maximum number of points
|
_pointPathLimit); // maximum number of points
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pointCount < 2 || Detour.dtStatusFailed(dtResult))
|
// Special case with start and end positions very close to each other
|
||||||
|
if (_polyLength == 1 && pointCount == 1)
|
||||||
|
{
|
||||||
|
// First point is start position, append end position
|
||||||
|
Detour.dtVcopy(pathPoints, 1 * 3, endPoint, 0);
|
||||||
|
pointCount++;
|
||||||
|
}
|
||||||
|
else if (pointCount < 2 || Detour.dtStatusFailed(dtResult))
|
||||||
{
|
{
|
||||||
// only happens if pass bad data to findStraightPath or navmesh is broken
|
// only happens if pass bad data to findStraightPath or navmesh is broken
|
||||||
// single point paths can be generated here
|
// single point paths can be generated here
|
||||||
|
|||||||
Reference in New Issue
Block a user