diff options
Diffstat (limited to 'src/content_cao.cpp')
-rw-r--r-- | src/content_cao.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 640ab6c73..840103cc7 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -957,10 +957,11 @@ public: } 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, |