summaryrefslogtreecommitdiffstats
path: root/src/animation/AnimBlendNode.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-25 15:15:01 +0200
committerGitHub <noreply@github.com>2020-06-25 15:15:01 +0200
commit592a6aef0bb336f1364e6bf38230f3793ec35c4d (patch)
tree3b8df6abb470acc7b9b55d0e8476e1478ba626c0 /src/animation/AnimBlendNode.cpp
parentrename attractor flag to type (diff)
parentCWanted, anim fix, ped objs renaming, remove III beta features (diff)
downloadre3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.gz
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.bz2
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.lz
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.xz
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.tar.zst
re3-592a6aef0bb336f1364e6bf38230f3793ec35c4d.zip
Diffstat (limited to 'src/animation/AnimBlendNode.cpp')
-rw-r--r--src/animation/AnimBlendNode.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/animation/AnimBlendNode.cpp b/src/animation/AnimBlendNode.cpp
index 63665873..c54b5718 100644
--- a/src/animation/AnimBlendNode.cpp
+++ b/src/animation/AnimBlendNode.cpp
@@ -97,10 +97,8 @@ CAnimBlendNode::FindKeyFrame(float t)
if(sequence->numFrames == 1){
remainingTime = 0.0f;
}else{
- frameA++;
-
// 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){
// reached end of animation