Fix deleting object physics again.

loadfix
cc9cii 10 years ago
parent d9755f82c3
commit 358cac2f0a

@ -39,7 +39,7 @@ namespace CSVWorld
Ogre::SceneManager *sceneManager = findSceneManager(sceneNodeName);
if(sceneManager)
{
// update maps
// update maps (NOTE: sometimes replaced)
mSceneNodeToRefId[sceneNodeName] = referenceId;
mSceneNodeToMesh[sceneNodeName] = mesh;
mRefIdToSceneNode[referenceId][sceneManager] = sceneNodeName;
@ -126,14 +126,11 @@ namespace CSVWorld
std::string referenceId = mSceneNodeToRefId[sceneNodeName];
if(referenceId != "")
{
if(mRefIdToSceneNode.find(referenceId) == mRefIdToSceneNode.end())
{
mEngine->removeRigidBody(referenceId);
mEngine->deleteRigidBody(referenceId);
}
}
}
void PhysicsSystem::replaceObject(const std::string &sceneNodeName, float scale,
const Ogre::Vector3 &position, const Ogre::Quaternion &rotation, bool placeable)

Loading…
Cancel
Save