Fixed animations not transitioning correctly when updating from a looping animation.

This commit is contained in:
Luis C.M. committed 2024-04-04 22:36:11 -05:00
1 parent 963393b7fe
commit a07a33c068
2 files changed
+6 -3

No files matched your search

@@ -251,7 +251,7 @@ public class Animation implements IAnimation {
}
this.currentFrameTime++;
if (this.currentFrameTime == this.currentFrame().getDuration()) {
if (this.currentFrame() != null && this.currentFrameTime == this.currentFrame().getDuration()) {
EventHooks.onAnimationFrameExited(this, this.currentFrame());
Frame prevFrame = (Frame) this.currentFrame();