Skip to content

Commit

Permalink
Shared: added missing scope
Browse files Browse the repository at this point in the history
  • Loading branch information
corporateshark committed Feb 6, 2025
1 parent c438646 commit d63715a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shared/UtilsAnim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,17 +260,19 @@ void updateAnimationBlending(GLTFContext& glTF, AnimationState& anim1, Animation
if (anim1.playOnce && anim1.currentTime > activeAnim1.duration) {
anim1.currentTime = activeAnim1.duration;
anim1.active = false;
} else
} else {
anim1.currentTime = fmodf(anim1.currentTime, activeAnim1.duration);
}

const Animation& activeAnim2 = glTF.animations[anim2.animId];
anim2.currentTime += activeAnim2.ticksPerSecond * dt;

if (anim2.playOnce && anim2.currentTime > activeAnim2.duration) {
anim2.currentTime = activeAnim2.duration;
anim2.active = false;
} else
} else {
anim2.currentTime = fmodf(anim2.currentTime, activeAnim2.duration);
}

// Update skinning
std::function<void(GLTFNodeRef gltfNode, const mat4& parentTransform)> traverseTree = [&](GLTFNodeRef gltfNode,
Expand Down

0 comments on commit d63715a

Please sign in to comment.