1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

Check dtNavMeshQuery::getPolyHeight status

Otherwise when it fails a node with zero height will be added to a path.
This commit is contained in:
elsid 2021-06-30 20:06:45 +02:00
parent 7e1630a7ad
commit 793c30ab8d
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -241,7 +241,8 @@ namespace DetourNavigator
}
}
navMeshQuery.getPolyHeight(polygonPath.front(), result->mResultPos.ptr(), &iterPos.y());
if (dtStatusFailed(navMeshQuery.getPolyHeight(polygonPath.front(), result->mResultPos.ptr(), &iterPos.y())))
return Status::GetPolyHeightFailed;
iterPos.x() = result->mResultPos.x();
iterPos.z() = result->mResultPos.z();