From 593f08609fa474c9aa881898e23e256e6e55c06e Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 5 Sep 2012 15:32:35 -0500 Subject: Core/Mmaps: Fixed a mistake in BuildPolyPath which could cause swimming creatures to bug in the navmesh generation. --- src/server/game/Movement/PathGenerator.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index c9cfff08ede..00aa8043312 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -194,10 +194,9 @@ void PathGenerator::BuildPolyPath(const Vector3 &startPos, const Vector3 &endPos // Check both start and end points, if they're both in water, then we can *safely* let the creature move for (uint32 i = 0; i < m_pathPoints.size(); ++i) { - LiquidData data; - m_sourceUnit->GetBaseMap()->getLiquidStatus(m_pathPoints[i].x, m_pathPoints[i].y, m_pathPoints[i].z, MAP_ALL_LIQUIDS, &data); + ZLiquidStatus status = m_sourceUnit->GetBaseMap()->getLiquidStatus(m_pathPoints[i].x, m_pathPoints[i].y, m_pathPoints[i].z, MAP_ALL_LIQUIDS, NULL); // One of the points is not in the water, cancel movement. - if (data.type_flags == MAP_LIQUID_TYPE_NO_WATER) + if (status == LIQUID_MAP_NO_WATER) { waterPath = false; break; -- cgit v1.2.3