From d89671dd5960a7184b060b47413dfce454cb72c4 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Tue, 3 Mar 2020 21:39:01 +0100 Subject: [PATCH] Core/PathFinding: Fix mmaps raycast without hit Update Z coordinate of end position when casting a mmap raycast that doesn't hit the target (cherry picked from commit 16ccc17621313e5c954f26ad23b15392fe06e763) --- src/server/game/Movement/PathGenerator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index c1e6482bd0b..9823b8d1b8a 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -457,6 +457,8 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con _type = PATHFIND_INCOMPLETE; return; } + else + _navMeshQuery->getPolyHeight(_pathPolyRefs[_polyLength - 1], endPoint, &endPoint[1]); } else {