summaryrefslogtreecommitdiffstats
path: root/src/animation/AnimBlendNode.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-20 19:26:27 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-20 19:26:27 +0200
commitcc60ad1946794bfa8cc8ae86e62829035ff6f360 (patch)
tree2710ee93888a29547e66887e3977a4fb2f375dc4 /src/animation/AnimBlendNode.cpp
parentmore weapon fixes (diff)
downloadre3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar
re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.gz
re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.bz2
re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.lz
re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.xz
re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.tar.zst
re3-cc60ad1946794bfa8cc8ae86e62829035ff6f360.zip
Diffstat (limited to '')
-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;