diff options
Diffstat (limited to 'extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp')
-rw-r--r-- | extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp b/extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp index 2d4e7f01420..d923d6f51f1 100644 --- a/extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp +++ b/extern/bullet/Bullet/NarrowPhaseCollision/PersistentManifold.cpp @@ -103,8 +103,13 @@ void PersistentManifold::AddManifoldPoint(const ManifoldPoint& newPoint) int insertIndex = GetNumContacts(); if (insertIndex == MANIFOLD_CACHE_SIZE) { - //sort cache so best points come first +#if MANIFOLD_CACHE_SIZE >= 4 + //sort cache so best points come first, based on area insertIndex = SortCachedPoints(newPoint); +#else + insertIndex = 0; +#endif + } else { m_cachedPoints++; |