From ae1702cfca8be81313a83ef0f470aca0bf87e484 Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Thu, 4 Sep 2008 18:31:28 +0000 Subject: [PATCH] Bugfix in btOptimizedBvh, update curNodeSubPart correctly. Thanks to Ole K. for the report and patch: http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2558&p=10251#p10251 --- src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp b/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp index 9b78fc0f7..a248c55b5 100644 --- a/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp +++ b/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp @@ -306,6 +306,8 @@ void btOptimizedBvh::updateBvhNodes(btStridingMeshInterface* meshInterface,int f if (curNodeSubPart >= 0) meshInterface->unLockReadOnlyVertexBase(curNodeSubPart); meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts, type,stride,&indexbase,indexstride,numfaces,indicestype,nodeSubPart); + + curNodeSubPart = nodeSubPart; btAssert(indicestype==PHY_INTEGER||indicestype==PHY_SHORT); } //triangles->getLockedReadOnlyVertexIndexBase(vertexBase,numVerts,