1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-31 18:31:04 +00:00

Make bone interpolation work again

This commit is contained in:
Lars Mueller 2025-08-20 18:49:02 +02:00 committed by sfan5
parent ce8e8f6bf4
commit 550b042076
2 changed files with 25 additions and 2 deletions

View file

@ -171,7 +171,8 @@ void CAnimatedMeshSceneNode::OnAnimate(u32 timeMs)
}
// set CurrentFrameNr
buildFrameNr(timeMs - LastTimeMs);
const u32 dtimeMs = timeMs - LastTimeMs;
buildFrameNr(dtimeMs);
LastTimeMs = timeMs;
// This needs to be done on animate, which is called recursively *before*
@ -183,7 +184,7 @@ void CAnimatedMeshSceneNode::OnAnimate(u32 timeMs)
copyOldTransforms();
if (OnAnimateCallback)
OnAnimateCallback(timeMs / 1000.0f);
OnAnimateCallback(dtimeMs / 1000.0f);
IAnimatedMeshSceneNode::OnAnimate(timeMs);