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.cpp6
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;