Commit dd521526 authored by bitplane's avatar bitplane

x meshes now don't re-skin if the last known frame is requested by getMesh....

x meshes now don't re-skin if the last known frame is requested by getMesh. doesn't fix the double skinning bug if there's more than one mesh on screen though.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@698 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4ee11782
......@@ -21,7 +21,7 @@ CXAnimationPlayer::CXAnimationPlayer(CXFileReader* reader,
const c8* filename)
: Reader(reader), Driver(driver), AnimatedMesh(0),
FileName(filename), Manipulator(manip), IsAnimatedSkinnedMesh(false),
CurrentAnimationTime(0.0f), LastAnimationTime(1.0f),
CurrentAnimationTime(-1.0f), LastAnimationTime(1.0f),
CurrentAnimationSet(0), DebugSkeletonCrossSize(1.0f)
{
......@@ -73,10 +73,14 @@ IMesh* CXAnimationPlayer::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop
if (!IsAnimatedSkinnedMesh)
return &OriginalMesh;
CurrentAnimationTime = (f32)frame;
animateSkeleton();
modifySkin();
updateBoundingBoxFromAnimation();
if (CurrentAnimationTime != (f32)frame)
{
CurrentAnimationTime = (f32)frame;
animateSkeleton();
modifySkin();
updateBoundingBoxFromAnimation();
}
return AnimatedMesh;
}
......
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