mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Merge remote branch 'scrawl/leakfix'
This commit is contained in:
commit
ba38bad46e
@ -222,6 +222,14 @@ namespace Physic
|
|||||||
PhysicEngine::~PhysicEngine()
|
PhysicEngine::~PhysicEngine()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
HeightFieldContainer::iterator hf_it = mHeightFieldMap.begin();
|
||||||
|
for (; hf_it != mHeightFieldMap.end(); ++hf_it)
|
||||||
|
{
|
||||||
|
dynamicsWorld->removeRigidBody(hf_it->second.mBody);
|
||||||
|
delete hf_it->second.mShape;
|
||||||
|
delete hf_it->second.mBody;
|
||||||
|
}
|
||||||
|
|
||||||
RigidBodyContainer::iterator rb_it = RigidBodyMap.begin();
|
RigidBodyContainer::iterator rb_it = RigidBodyMap.begin();
|
||||||
for (; rb_it != RigidBodyMap.end(); ++rb_it)
|
for (; rb_it != RigidBodyMap.end(); ++rb_it)
|
||||||
{
|
{
|
||||||
@ -320,6 +328,8 @@ namespace Physic
|
|||||||
dynamicsWorld->removeRigidBody(hf.mBody);
|
dynamicsWorld->removeRigidBody(hf.mBody);
|
||||||
delete hf.mShape;
|
delete hf.mShape;
|
||||||
delete hf.mBody;
|
delete hf.mBody;
|
||||||
|
|
||||||
|
mHeightFieldMap.erase(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
RigidBody* PhysicEngine::createRigidBody(std::string mesh,std::string name,float scale)
|
RigidBody* PhysicEngine::createRigidBody(std::string mesh,std::string name,float scale)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user