From 3989e3df183a9b1df26c46e2a5855841f6837931 Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 22 Jun 2020 08:58:49 +0200 Subject: [PATCH] anim fix --- src/animation/AnimBlendNode.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/animation/AnimBlendNode.cpp b/src/animation/AnimBlendNode.cpp index 860046e8..63665873 100644 --- a/src/animation/AnimBlendNode.cpp +++ b/src/animation/AnimBlendNode.cpp @@ -102,7 +102,6 @@ CAnimBlendNode::FindKeyFrame(float t) // advance until t is between frameB and frameA while(t > sequence->GetKeyFrame(frameA)->deltaTime){ t -= sequence->GetKeyFrame(frameA)->deltaTime; - frameA++; if(frameA + 1 >= sequence->numFrames){ // reached end of animation if(!association->IsRepeating()){ @@ -112,7 +111,7 @@ CAnimBlendNode::FindKeyFrame(float t) } frameA = 0; } - frameB = frameA; + frameB = frameA++; } remainingTime = sequence->GetKeyFrame(frameA)->deltaTime - t;