diff --git a/src/main/java/mchorse/aperture/camera/CameraRunner.java b/src/main/java/mchorse/aperture/camera/CameraRunner.java index 456da54d..0d1a8b43 100644 --- a/src/main/java/mchorse/aperture/camera/CameraRunner.java +++ b/src/main/java/mchorse/aperture/camera/CameraRunner.java @@ -37,11 +37,6 @@ public class CameraRunner */ private boolean isRunning = false; - /** - * The duration of camera profile - */ - private long duration; - /** * Camera profile which is getting currently played */ @@ -132,7 +127,6 @@ public void start(CameraProfile profile, long start) this.position.set(this.mc.player); this.isRunning = true; - this.duration = this.profile.getDuration(); this.ticks = start; } @@ -202,9 +196,10 @@ public void onRenderTick(RenderTickEvent event) return; } - long progress = Math.min(this.ticks, this.duration); + long duration = this.profile.getDuration(); + long progress = this.ticks; - if (progress >= this.duration) + if (progress >= duration) { this.stop(); } diff --git a/src/main/java/mchorse/aperture/client/gui/GuiCameraEditor.java b/src/main/java/mchorse/aperture/client/gui/GuiCameraEditor.java index c0828e6b..65c17c6d 100644 --- a/src/main/java/mchorse/aperture/client/gui/GuiCameraEditor.java +++ b/src/main/java/mchorse/aperture/client/gui/GuiCameraEditor.java @@ -693,6 +693,9 @@ public void updateSaveButton(CameraProfile profile) */ public void updateCameraEditor(EntityPlayer player) { + this.maxScrub = 0; + this.haveScrubbed = false; + this.updateOverlay(); this.position.set(player); this.setProfile(ClientProxy.control.currentProfile); @@ -707,8 +710,6 @@ public void updateCameraEditor(EntityPlayer player) GuiIngameForge.renderHotbar = false; GuiIngameForge.renderCrosshairs = false; - this.maxScrub = 0; - this.haveScrubbed = false; this.flight.setFlightEnabled(false); ClientProxy.control.cache(); this.setAspectRatio(Aperture.editorLetterboxAspect.get());