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.
This commit is contained in:
Jonas Herzig
2022-06-26 12:28:07 +02:00
parent 40f07279cf
commit 4f9a730b6d

View File

@@ -9,9 +9,9 @@ import static net.minecraft.util.math.MathHelper.sin;
// TODO: Marius is responsible for this. Please, someone clean it up. // TODO: Marius is responsible for this. Please, someone clean it up.
public class ClassicCameraController implements CameraController { public class ClassicCameraController implements CameraController {
private static final double SPEED_CHANGE = 0.5;
private static final double LOWER_SPEED = 2; private static final double LOWER_SPEED = 2;
private static final double UPPER_SPEED = 20; private static final double UPPER_SPEED = 20;
private static final double SPEED_CHANGE = (UPPER_SPEED - LOWER_SPEED) / 2000;
private final CameraEntity camera; private final CameraEntity camera;