Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Physics/Bullet')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index 21158a9461d..c7ba17e7f97 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -539,6 +539,13 @@ static void DeleteBulletShape(btCollisionShape* shape, bool free)
if (meshInterface)
delete meshInterface;
}
+ else if (shape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE)
+ {
+ btGImpactMeshShape* meshShape = static_cast<btGImpactMeshShape*>(shape);
+ btStridingMeshInterface* meshInterface = meshShape->getMeshInterface();
+ if (meshInterface)
+ delete meshInterface;
+ }
if (free) {
delete shape;
}
@@ -2125,7 +2132,6 @@ btCollisionShape* CcdShapeConstructionInfo::CreateBulletShape(btScalar margin, b
&m_vertexArray[0],
3*sizeof(btScalar)
);
-
btGImpactMeshShape* gimpactShape = new btGImpactMeshShape(indexVertexArrays);
gimpactShape->setMargin(margin);
collisionShape = gimpactShape;