]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/content_cao.cpp
Revert "Fix settings to honor numeric conversion errors"
[dragonfireclient.git] / src / content_cao.cpp
index 640ab6c7302ae9162785299c5936a553297356d7..840103cc74644f7406ae98e569258b4c7bdad3e7 100644 (file)
@@ -957,10 +957,11 @@ class GenericCAO : public ClientActiveObject
                }
                else if(m_prop.visual == "mesh"){
                        infostream<<"GenericCAO::addToScene(): mesh"<<std::endl;
-                       scene::IAnimatedMesh *mesh = smgr->getMesh(m_prop.mesh.c_str());
+                       scene::IAnimatedMesh *mesh = m_gamedef->getMesh(m_prop.mesh);
                        if(mesh)
                        {
                                m_animated_meshnode = smgr->addAnimatedMeshSceneNode(mesh, NULL);
+                               mesh->drop(); // The scene node took hold of it
                                m_animated_meshnode->animateJoints(); // Needed for some animations
                                m_animated_meshnode->setScale(v3f(m_prop.visual_size.X,
                                                m_prop.visual_size.Y,