Allow camera zooming by default without it in json

Also had to add an extra check if json isn't loaded
This commit is contained in:
Pazaz 2022-06-19 20:03:02 -04:00
parent 5792a3c92b
commit 299ebc243d
3 changed files with 5 additions and 2 deletions

View file

@ -37,7 +37,7 @@ public final class JavaMouseWheel extends MouseWheel implements MouseWheelListen
this.anInt4233 += arg0.getWheelRotation();
int diff = this.anInt4233 - previous;
if (GlobalJsonConfig.instance.mouseWheelZoom && Keyboard.instance.isShiftPressed()) {
if (((GlobalJsonConfig.instance != null && GlobalJsonConfig.instance.mouseWheelZoom) || (GlobalJsonConfig.instance == null && GlobalConfig.MOUSEWHEEL_ZOOM)) && Keyboard.instance.isShiftPressed()) {
Camera.ZOOM = clamp(200, 1200, Camera.ZOOM + (diff >= 0 ? 50: -50));
}
}