mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
Use custom deleter for btCompoundShape to delete children shapes
This commit is contained in:
parent
b731a981c4
commit
a851ac5fea
@ -179,7 +179,7 @@ osg::ref_ptr<Resource::BulletShape> BulletNifLoader::load(const Nif::File& nif)
|
||||
child.release();
|
||||
mStaticMesh.release();
|
||||
}
|
||||
mShape->mCollisionShape.reset(mCompoundShape.release());
|
||||
mShape->mCollisionShape = std::move(mCompoundShape);
|
||||
}
|
||||
else if (mStaticMesh)
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ private:
|
||||
|
||||
void handleNiTriShape(const Nif::Node *nifNode, int flags, const osg::Matrixf& transform, bool isAnimated, bool avoid);
|
||||
|
||||
std::unique_ptr<btCompoundShape> mCompoundShape;
|
||||
std::unique_ptr<btCompoundShape, Resource::DeleteCollisionShape> mCompoundShape;
|
||||
|
||||
std::unique_ptr<btTriangleMesh> mStaticMesh;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user