diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-06-22 03:02:44 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-06-22 03:20:56 +0200 |
commit | f3ed6659c32ec61c2c4c806707655e0c58123e4c (patch) | |
tree | 1d71dd86ef08d87e4ed703302224d330cecf4ae2 /src/animation/AnimBlendNode.cpp | |
parent | killing peds increase chaos level (diff) | |
download | re3-f3ed6659c32ec61c2c4c806707655e0c58123e4c.tar re3-f3ed6659c32ec61c2c4c806707655e0c58123e4c.tar.gz re3-f3ed6659c32ec61c2c4c806707655e0c58123e4c.tar.bz2 re3-f3ed6659c32ec61c2c4c806707655e0c58123e4c.tar.lz re3-f3ed6659c32ec61c2c4c806707655e0c58123e4c.tar.xz re3-f3ed6659c32ec61c2c4c806707655e0c58123e4c.tar.zst re3-f3ed6659c32ec61c2c4c806707655e0c58123e4c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/animation/AnimBlendNode.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/animation/AnimBlendNode.cpp b/src/animation/AnimBlendNode.cpp index 860046e8..4ef7d1c0 100644 --- a/src/animation/AnimBlendNode.cpp +++ b/src/animation/AnimBlendNode.cpp @@ -97,12 +97,9 @@ 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; - frameA++; if(frameA + 1 >= sequence->numFrames){ // reached end of animation if(!association->IsRepeating()){ |