Skip to content

Commit

Permalink
Core/PathGenerator: Temporarily revert 29bf280
Browse files Browse the repository at this point in the history
Temporarily revert 29bf280 since our recast implementation always expects a path to have different polygons.
A proper fix will be implemented later on, splitting a path with 1 single polygons in smaller steps in a similar way of how FindSmoothPath() works
  • Loading branch information
jackpoz committed Jan 18, 2020
1 parent 50c9478 commit 9f8477c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/server/game/Movement/PathGenerator.cpp
Expand Up @@ -250,9 +250,14 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
{
TC_LOG_DEBUG("maps.mmaps", "++ BuildPolyPath :: (startPoly == endPoly)");

BuildShortcut();

_pathPolyRefs[0] = startPoly;
_pathPolyRefs[1] = endPoly;
_polyLength = 2;
_polyLength = 1;

_type = farFromPoly ? PATHFIND_INCOMPLETE : PATHFIND_NORMAL;
TC_LOG_DEBUG("maps.mmaps", "++ BuildPolyPath :: path type %d", _type);
return;
}

// look for startPoly/endPoly in current path
Expand Down

0 comments on commit 9f8477c

Please sign in to comment.