Switching frames now switches the animation to that frame whether you're paused or not

This commit is contained in:
luisc committed 2023-11-10 07:58:15 -06:00
1 parent f807df934a
commit 42c069aeb5
3 files changed
+5 -8

No files matched your search

@@ -10,7 +10,6 @@ import noppes.npcs.constants.EnumAnimationPart;
import noppes.npcs.controllers.AnimationController;
import java.util.ArrayList;
import java.util.UUID;
public class Animation implements IAnimation {
@@ -253,12 +252,12 @@ public class Animation implements IAnimation {
}
@SideOnly(Side.CLIENT)
public void setPausedValues() {
public void jumpToCurrentFrame() {
this.currentFrameTime = 0;
Frame frame = (Frame) this.currentFrame();
for (EnumAnimationPart part : EnumAnimationPart.values()) {
if (frame.frameParts.containsKey(part)) {
frame.frameParts.get(part).setPausedValues();
frame.frameParts.get(part).jumpToCurrentFrame();
}
}
}