[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18491] trunk/blender/extern/bullet2/src/ BulletCollision/CollisionShapes/btCompoundShape.cpp: Bullet bug fix: bad pointer in btCompoundShape::addChildShape() - patch submited to Bullet forum.
Benoit Bolsee
benoit.bolsee at online.be
Tue Jan 13 23:21:04 CET 2009
Revision: 18491
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18491
Author: ben2610
Date: 2009-01-13 23:21:04 +0100 (Tue, 13 Jan 2009)
Log Message:
-----------
Bullet bug fix: bad pointer in btCompoundShape::addChildShape() - patch submited to Bullet forum. This bug fix is needed in preparation of the setparent coumpound shape patch.
Modified Paths:
--------------
trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp
Modified: trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp
===================================================================
--- trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp 2009-01-13 21:18:05 UTC (rev 18490)
+++ trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp 2009-01-13 22:21:04 UTC (rev 18491)
@@ -49,8 +49,6 @@
child.m_childShapeType = shape->getShapeType();
child.m_childMargin = shape->getMargin();
- m_children.push_back(child);
-
//extend the local aabbMin/aabbMax
btVector3 localAabbMin,localAabbMax;
shape->getAabb(localTransform,localAabbMin,localAabbMax);
@@ -69,10 +67,11 @@
if (m_dynamicAabbTree)
{
const btDbvtVolume bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax);
- int index = m_children.size()-1;
+ int index = m_children.size();
child.m_node = m_dynamicAabbTree->insert(bounds,(void*)index);
}
+ m_children.push_back(child);
}
void btCompoundShape::removeChildShapeByIndex(int childShapeIndex)
More information about the Bf-blender-cvs
mailing list