diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-06-25 16:20:20 +0300 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-06-25 16:20:20 +0300 |
commit | c72fab15b49645c31086db6eec556a474cfad824 (patch) | |
tree | fa54696fc404889397e35769129d6635117e4405 /src | |
parent | 592a6aef0bb336f1364e6bf38230f3793ec35c4d (diff) |
fix anims again
Diffstat (limited to 'src')
-rw-r--r-- | src/animation/AnimBlendNode.cpp | 8 |
1 files 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; |