assign proper index when removing a child shape from btCompoundShape
Thanks to sparkprime for the report and fix in Issue 354 See http://code.google.com/p/bullet/issues/detail?id=354 Fix a few warnings
This commit is contained in:
@@ -110,6 +110,8 @@ void btCompoundShape::removeChildShapeByIndex(int childShapeIndex)
|
||||
m_dynamicAabbTree->remove(m_children[childShapeIndex].m_node);
|
||||
}
|
||||
m_children.swap(childShapeIndex,m_children.size()-1);
|
||||
if (m_dynamicAabbTree)
|
||||
m_children[childShapeIndex].m_node->dataAsInt = childShapeIndex;
|
||||
m_children.pop_back();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user