Core/Mmaps: Fixed a mistake in BuildPolyPath which could cause swimming creatures to bug in the navmesh generation.

This commit is contained in:
Subv committed 2012-09-05 15:32:35 -05:00
1 parent c2f446ded9
commit 593f08609f
1 file changed
+2 -3
+2 -3
View File
@@ -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;