aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2020-01-18 20:24:26 +0100
committerjackpoz <giacomopoz@gmail.com>2020-01-18 20:24:26 +0100
commit9f8477cd112bf0f52e23afc9cdee4adfcf540de5 (patch)
treea742120e13aea2eb0502a61a34cad59897674a80 /src
parent50c9478b763e83c7ebdbbbc482bdd783afd584c6 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Movement/PathGenerator.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp
index 3c61f531de0..d436ff532d8 100644
--- a/src/server/game/Movement/PathGenerator.cpp
+++ b/src/server/game/Movement/PathGenerator.cpp
@@ -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