Skip to content

Commit

Permalink
temp vector
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Oct 21, 2023
1 parent 30c2eac commit e3e4ed9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

public final class ModelAnimator
{
private static final Vec3f TEMP = new Vec3f();

public static void updateKeyframeAnimations(
AnimatedEntity animatedEntity,
AnimatedEntityModel animatedEntityModel,
Expand All @@ -39,7 +41,7 @@ public static void updateKeyframeAnimations(

animationState.update(animationProgress, 1.0F);
animationState.run((state) -> {
animateKeyframe(animatedEntityModel, animation, state.getTimeRunning(), 1.0F, new Vec3f());
animateKeyframe(animatedEntityModel, animation, state.getTimeRunning(), 1.0F, TEMP);
});
}

Expand All @@ -51,7 +53,7 @@ public static void updateMovementKeyframeAnimations(
) {
KeyframeAnimation keyframeAnimation = animatedEntity.getMovementAnimation();
Animation animation = keyframeAnimation.getAnimation();
animateKeyframe(animatedEntityModel, animation, runningTime, f, new Vec3f());
animateKeyframe(animatedEntityModel, animation, runningTime, f, TEMP);
}

public static void animateKeyframe(
Expand Down

0 comments on commit e3e4ed9

Please sign in to comment.