summaryrefslogtreecommitdiffstats
path: root/src/animation
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-25 15:20:20 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-25 15:20:20 +0200
commitc72fab15b49645c31086db6eec556a474cfad824 (patch)
treefa54696fc404889397e35769129d6635117e4405 /src/animation
parentMerge pull request #638 from erorcun/miami (diff)
downloadre3-c72fab15b49645c31086db6eec556a474cfad824.tar
re3-c72fab15b49645c31086db6eec556a474cfad824.tar.gz
re3-c72fab15b49645c31086db6eec556a474cfad824.tar.bz2
re3-c72fab15b49645c31086db6eec556a474cfad824.tar.lz
re3-c72fab15b49645c31086db6eec556a474cfad824.tar.xz
re3-c72fab15b49645c31086db6eec556a474cfad824.tar.zst
re3-c72fab15b49645c31086db6eec556a474cfad824.zip
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;