Commit c02aca00 authored by lukeph's avatar lukeph

-skinnedMesh: meshes with weights are still counted as animated for ragdolls,...

-skinnedMesh: meshes with weights are still counted as animated for ragdolls, etc, even if they have no animation data.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@930 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 602d5c1f
......@@ -403,6 +403,7 @@ void CSkinnedMesh::skinMesh()
if ( !HasAnimation)
return;
//----------------
// Temp!
buildAll_GlobalAnimatedMatrices();
......@@ -682,6 +683,15 @@ void CSkinnedMesh::checkForAnimation()
}
}
//meshes with weights, are still counted as animated for ragdolls, etc
if (!HasAnimation)
{
for(i=0;i<AllJoints.size();++i)
{
if (AllJoints[i]->Weights.size()) HasAnimation = true;
}
}
if (HasAnimation)
{
......
......@@ -107,6 +107,7 @@
<Unit filename="..\..\include\IMeshLoader.h" />
<Unit filename="..\..\include\IMeshManipulator.h" />
<Unit filename="..\..\include\IMeshSceneNode.h" />
<Unit filename="..\..\include\IMeshWriter.h" />
<Unit filename="..\..\include\IMetaTriangleSelector.h" />
<Unit filename="..\..\include\IOSOperator.h" />
<Unit filename="..\..\include\IParticleAffector.h" />
......@@ -223,6 +224,8 @@
<Unit filename="CCameraSceneNode.h" />
<Unit filename="CColladaFileLoader.cpp" />
<Unit filename="CColladaFileLoader.h" />
<Unit filename="CColladaMeshWriter.cpp" />
<Unit filename="CColladaMeshWriter.h" />
<Unit filename="CColorConverter.cpp" />
<Unit filename="CColorConverter.h" />
<Unit filename="CCubeSceneNode.cpp" />
......@@ -358,6 +361,8 @@
<Unit filename="CIrrDeviceStub.h" />
<Unit filename="CIrrDeviceWin32.cpp" />
<Unit filename="CIrrDeviceWin32.h" />
<Unit filename="CIrrMeshWriter.cpp" />
<Unit filename="CIrrMeshWriter.h" />
<Unit filename="CLMTSMeshFileLoader.cpp" />
<Unit filename="CLMTSMeshFileLoader.h" />
<Unit filename="CLightSceneNode.cpp" />
......
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