From 99340a92e752bd0a05509d1e0e9c5d48bb82042f Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 9 Feb 2025 23:50:29 +1100 Subject: prevent zooming past a million to prevent crashing [skip ci] --- source/client/StarClientApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/client') diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index 908d0da..b4b79b0 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -1044,7 +1044,7 @@ void ClientApplication::updateRunning(float dt) { newZoom = lerp(clamp(abs(intZoom - newZoom) - 1.f, 0.f, 1.f), intZoom, intNewZoom); m_cameraZoomDirection = 0; } - config->set("zoomLevel", newZoom); + config->set("zoomLevel", min(1000000.f, newZoom)); } if (m_controllerInput && m_controllerLeftStick.magnitudeSquared() > 0.01f) -- cgit v1.2.3