1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-24 23:23:51 +00:00

Fix deleting physic objects.

This commit is contained in:
cc9cii 2014-11-09 18:37:04 +11:00
parent 9f16b86bd8
commit 89eb30054b

View file

@ -103,7 +103,8 @@ namespace CSVWorld
}
// check whether the physics model should be deleted
if(mRefIdToSceneNode.find(referenceId) == mRefIdToSceneNode.end())
itRef = mRefIdToSceneNode.find(referenceId);
if(itRef == mRefIdToSceneNode.end() || (*itRef).second.empty())
{
mEngine->removeRigidBody(referenceId);
mEngine->deleteRigidBody(referenceId);