aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2020-03-03 21:39:01 +0100
committerjackpoz <giacomopoz@gmail.com>2020-03-03 21:39:01 +0100
commit16ccc17621313e5c954f26ad23b15392fe06e763 (patch)
tree0d1e57e078eb3e6994ae9b33c500caa4d32281af
parentcc6c27f96fbf78a981bce4030f3c2eb80855033e (diff)
Core/PathFinding: Fix mmaps raycast without hit
Update Z coordinate of end position when casting a mmap raycast that doesn't hit the target
-rw-r--r--src/server/game/Movement/PathGenerator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp
index d995ff7c7f6..7ea438ad677 100644
--- a/src/server/game/Movement/PathGenerator.cpp
+++ b/src/server/game/Movement/PathGenerator.cpp
@@ -456,6 +456,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
{