diff --git a/src/bounce/quickhull/qh_hull.cpp b/src/bounce/quickhull/qh_hull.cpp index 24a24f7..03e66e6 100644 --- a/src/bounce/quickhull/qh_hull.cpp +++ b/src/bounce/quickhull/qh_hull.cpp @@ -18,8 +18,6 @@ #include #include -#include -#include #include static float32 qhFindAABB(u32 iMin[3], u32 iMax[3], const b3Vec3* vertices, u32 count) @@ -732,6 +730,12 @@ void qhHull::MergeFaces() for (u32 i = 0; i < m_newFaceCount; ++i) { qhFace* face = m_newFaces[i]; + + // Was the face merged? + if (face->state == qhFace::e_deleted) + { + continue; + } // Merge the faces while there is no face left to merge. while (MergeFace(face));