diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-06-20 19:26:27 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-06-20 19:26:27 +0200 |
commit | cc60ad1946794bfa8cc8ae86e62829035ff6f360 (patch) | |
tree | 2710ee93888a29547e66887e3977a4fb2f375dc4 /src/animation/AnimBlendNode.cpp | |
parent | more weapon fixes (diff) | |
download | re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.gz re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.bz2 re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.lz re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.xz re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.zst re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.zip |
Diffstat (limited to 'src/animation/AnimBlendNode.cpp')
-rw-r--r-- | src/animation/AnimBlendNode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/animation/AnimBlendNode.cpp b/src/animation/AnimBlendNode.cpp index 4186e994..860046e8 100644 --- a/src/animation/AnimBlendNode.cpp +++ b/src/animation/AnimBlendNode.cpp @@ -102,8 +102,8 @@ CAnimBlendNode::FindKeyFrame(float t) // advance until t is between frameB and frameA while(t > sequence->GetKeyFrame(frameA)->deltaTime){ t -= sequence->GetKeyFrame(frameA)->deltaTime; - frameB = frameA++; - if(frameA >= sequence->numFrames){ + frameA++; + if(frameA + 1 >= sequence->numFrames){ // reached end of animation if(!association->IsRepeating()){ CalcDeltas(); @@ -111,8 +111,8 @@ CAnimBlendNode::FindKeyFrame(float t) return false; } frameA = 0; - frameB = 0; } + frameB = frameA; } remainingTime = sequence->GetKeyFrame(frameA)->deltaTime - t; |