From 9eafd794f8900183e3ff260ca4e0468a60d947f4 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 --- 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 1c8adf779c6..0ee65466527 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -459,6 +459,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 {