Commit 1c495448 authored by hybrid's avatar hybrid

Getting onto a patch from an anonymous poster, I've added some else branches...

Getting onto a patch from an anonymous poster, I've added some else branches to avoid too large redundant code parts after unconditional returns. These might at least raise some unwanted warnings, though I don't know why an error would occur.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3869 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4533956f
......@@ -196,7 +196,7 @@ IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame()
{
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
return 0;
#endif
#else
// As multiple scene nodes may be sharing the same skinned mesh, we have to
// re-animate it every frame to ensure that this node gets the mesh that it needs.
......@@ -230,6 +230,7 @@ IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame()
}
return skinnedMesh;
#endif
}
}
......@@ -579,7 +580,7 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName)
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
os::Printer::log("Compiled without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", ELL_WARNING);
return 0;
#endif
#else
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
{
......@@ -606,6 +607,7 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName)
}
return JointChildSceneNodes[number];
#endif
}
......@@ -617,7 +619,7 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID)
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
os::Printer::log("Compiled without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", ELL_WARNING);
return 0;
#endif
#else
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
{
......@@ -634,6 +636,7 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID)
}
return JointChildSceneNodes[jointID];
#endif
}
//! Gets joint count.
......@@ -641,7 +644,7 @@ u32 CAnimatedMeshSceneNode::getJointCount() const
{
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
return 0;
#endif
#else
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
return 0;
......@@ -649,6 +652,7 @@ u32 CAnimatedMeshSceneNode::getJointCount() const
ISkinnedMesh *skinnedMesh=(ISkinnedMesh*)Mesh;
return skinnedMesh->getJointCount();
#endif
}
......@@ -949,7 +953,7 @@ void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions)
{
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
return;
#endif
#else
if (Mesh && Mesh->getMeshType() == EAMT_SKINNED )
{
checkJoints();
......@@ -1021,6 +1025,7 @@ void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions)
}
}
}
#endif
}
/*!
......@@ -1029,7 +1034,7 @@ void CAnimatedMeshSceneNode::checkJoints()
{
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
return;
#endif
#else
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
return;
......@@ -1047,6 +1052,7 @@ void CAnimatedMeshSceneNode::checkJoints()
JointsUsed=true;
JointMode=EJUOR_READ;
}
#endif
}
/*!
......
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