From 4f9a730b6d185b839de08a3a570940c06e353fc7 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Sun, 26 Jun 2022 12:28:07 +0200 Subject: [PATCH] Fix classic camera speed changing way too quickly (fixes #719) On my system, a single scroll tick results in 120 calls, which is fine for the vanilla camera controller because it has a range of 2000, but the classic controller only has a range of 36, making it impossible to select anything but the extremes. This commit changes the size of the range to match that of the vanilla controller. --- .../com/replaymod/replay/camera/ClassicCameraController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/replaymod/replay/camera/ClassicCameraController.java b/src/main/java/com/replaymod/replay/camera/ClassicCameraController.java index 316b4e25..4a1692fe 100644 --- a/src/main/java/com/replaymod/replay/camera/ClassicCameraController.java +++ b/src/main/java/com/replaymod/replay/camera/ClassicCameraController.java @@ -9,9 +9,9 @@ import static net.minecraft.util.math.MathHelper.sin; // TODO: Marius is responsible for this. Please, someone clean it up. public class ClassicCameraController implements CameraController { - private static final double SPEED_CHANGE = 0.5; private static final double LOWER_SPEED = 2; private static final double UPPER_SPEED = 20; + private static final double SPEED_CHANGE = (UPPER_SPEED - LOWER_SPEED) / 2000; private final CameraEntity camera;