From c72fab15b49645c31086db6eec556a474cfad824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Thu, 25 Jun 2020 16:20:20 +0300 Subject: [PATCH] fix anims again --- src/animation/AnimBlendNode.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/animation/AnimBlendNode.cpp b/src/animation/AnimBlendNode.cpp index c54b5718..ac1328eb 100644 --- a/src/animation/AnimBlendNode.cpp +++ b/src/animation/AnimBlendNode.cpp @@ -98,18 +98,18 @@ CAnimBlendNode::FindKeyFrame(float t) remainingTime = 0.0f; }else{ // advance until t is between frameB and frameA - while(t > sequence->GetKeyFrame(++frameA)->deltaTime){ + while (t > sequence->GetKeyFrame(++frameA)->deltaTime) { t -= sequence->GetKeyFrame(frameA)->deltaTime; - if(frameA + 1 >= sequence->numFrames){ + if (frameA + 1 >= sequence->numFrames) { // reached end of animation - if(!association->IsRepeating()){ + if (!association->IsRepeating()) { CalcDeltas(); remainingTime = 0.0f; return false; } frameA = 0; } - frameB = frameA++; + frameB = frameA; } remainingTime = sequence->GetKeyFrame(frameA)->deltaTime - t;