In my app, I add an animation scene node as a child of my mesh (CAnimatedMeshSceneNode) representing a spell effect. In 1.3.1, I could call removeChild using the sfx node id and it would remove the effect. In 1.4, it isn't getting removed.
I've traced the problem to CAnimatedMeshSceneNode::removeChild(). The problem is that, for me, JointsUsed == false, because I never call any of the methods that cause checkJoints() to be called. Here's the relevant code excerpted from CAnimatedMeshSceneNode.cpp:
Code: Select all
if (JointsUsed) //stop it doing weird things while the joints are being made
{
if (ISceneNode::removeChild(child))
{
for (u32 i=0; i<JointChildSceneNodes.size(); ++i)
if (JointChildSceneNodes[i] == child)
{
//JointChildSceneNodes[i]->drop();
JointChildSceneNodes[i] = 0;
return true;
}
return true;
}
}
As this code is all new in 1.4, I'm not sure if there is a new method call I'm supposed to be making that causes JointsUsed to get set. It seems to happen in checkJoints(). But I don't understand why I should have to call any of the joint methods if I'm not using joint nodes, just in order to get removeChild to work? It looks like a bug to me, like its trying to guard against a race between removeChild being called while joint nodes are getting demand-created (the comment says as much), but problem is, I think it needs to use a different guard variable to do it.