summaryrefslogtreecommitdiff
path: root/src/animation
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-25 16:20:20 +0300
committereray orçunus <erayorcunus@gmail.com>2020-06-25 16:20:20 +0300
commitc72fab15b49645c31086db6eec556a474cfad824 (patch)
treefa54696fc404889397e35769129d6635117e4405 /src/animation
parent592a6aef0bb336f1364e6bf38230f3793ec35c4d (diff)
fix anims again
Diffstat (limited to 'src/animation')
-rw-r--r--src/animation/AnimBlendNode.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/animation/AnimBlendNode.cpp b/src/animation/AnimBlendNode.cpp
index c54b5718..ac1328eb 100644
--- a/src/animation/AnimBlendNode.cpp
+++ b/src/animation/AnimBlendNode.cpp
@@ -98,18 +98,18 @@ CAnimBlendNode::FindKeyFrame(float t)
remainingTime = 0.0f;
}else{
// 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){
+ if (frameA + 1 >= sequence->numFrames) {
// reached end of animation
- if(!association->IsRepeating()){
+ if (!association->IsRepeating()) {
CalcDeltas();
remainingTime = 0.0f;
return false;
}
frameA = 0;
}
- frameB = frameA++;
+ frameB = frameA;
}
remainingTime = sequence->GetKeyFrame(frameA)->deltaTime - t;