Commit f3927d5c authored by lukeph's avatar lukeph

Was missing a call to load the joints into the node in getJointNode(u32 jointID)

like with getJointNode(const c8* jointName)

reported by xray here: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=30486

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1634 dfc29bdd-3216-0410-991c-e03cc46cb475
parent a98153f8
......@@ -577,7 +577,10 @@ IShadowVolumeSceneNode* CAnimatedMeshSceneNode::addShadowVolumeSceneNode(const I
IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName)
{
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
{
os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING);
return 0;
}
checkJoints();
......@@ -605,6 +608,14 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName)
//! the corresponding joint, if the mesh in this scene node is a skinned mesh.
IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID)
{
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
{
os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING);
return 0;
}
checkJoints();
if (JointChildSceneNodes.size() <= jointID)
{
os::Printer::log("Joint not loaded into node", ELL_WARNING);
......@@ -1026,8 +1037,8 @@ ISceneNode* CAnimatedMeshSceneNode::clone(ISceneNode* newParent, ISceneManager*
if (!newParent) newParent = Parent;
if (!newManager) newManager = SceneManager;
CAnimatedMeshSceneNode * newNode =
new CAnimatedMeshSceneNode(Mesh, newParent, newManager, ID, RelativeTranslation,
CAnimatedMeshSceneNode * newNode =
new CAnimatedMeshSceneNode(Mesh, newParent, newManager, ID, RelativeTranslation,
RelativeRotation, RelativeScale);
newNode->cloneMembers(this, newManager);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment