From e4dba606cb013b7e31b97a167b3d2e5e7bc13032 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Thu, 20 Feb 2020 21:31:26 +0100 Subject: [PATCH] Core/PathGenerator: Temporarily revert 29bf280e3496cf13c24ccb20e37da29d3bfa74d9 Temporarily revert 29bf280e3496cf13c24ccb20e37da29d3bfa74d9 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 --- src/server/game/Movement/PathGenerator.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index af1eb271eb2..6abc73d3962 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -255,8 +255,11 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con 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