summaryrefslogtreecommitdiffstats
path: root/src/animation/AnimBlendNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animation/AnimBlendNode.cpp')
-rw-r--r--src/animation/AnimBlendNode.cpp5
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()){