diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp index f056035f5..ecfe0f2de 100644 --- a/src/client/content_cao.cpp +++ b/src/client/content_cao.cpp @@ -1386,43 +1386,6 @@ void GenericCAO::updateAnimationSpeed() m_animated_meshnode->setAnimationSpeed(m_animation_speed); } -void GenericCAO::updateBones(f32 dtime) -{ - if (!m_animated_meshnode) - return; - if (m_bone_override.empty()) - return; - - // FIXME these need to be applied at a different point in time - // in order to be relative to the animated bone positions of the current frame - for (auto &it : m_bone_override) { - std::string bone_name = it.first; - scene::IBoneSceneNode* bone = m_animated_meshnode->getJointNode(bone_name.c_str()); - if (!bone) - continue; - - BoneOverride &props = it.second; - props.dtime_passed += dtime; - - bone->setPosition(props.getPosition(bone->getPosition())); - bone->setRotation(props.getRotationEulerDeg(bone->getRotation())); - bone->setScale(props.getScale(bone->getScale())); - } - - // The following is needed for set_bone_pos to propagate to - // attached objects correctly. - // Irrlicht ought to do this, but doesn't when using EJUOR_CONTROL. - for (u32 i = 0; i < m_animated_meshnode->getJointCount(); ++i) { - auto bone = m_animated_meshnode->getJointNode(i); - // Look for the root bone. - if (bone && bone->getParent() == m_animated_meshnode) { - // Update entire skeleton. - bone->updateAbsolutePositionOfAllChildren(); - break; - } - } -} - void GenericCAO::updateAttachments() { ClientActiveObject *parent = getParent();