diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-02-09 23:50:29 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-02-09 23:50:29 +1100 |
commit | 99340a92e752bd0a05509d1e0e9c5d48bb82042f (patch) | |
tree | b02f74cf0afd5d9de44c0fd6941cd794c5902abc /source/client/StarClientApplication.cpp | |
parent | 9c35c872179def43bf3637d6b731308a2baf7371 (diff) |
prevent zooming past a million to prevent crashing
[skip ci]
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r-- | source/client/StarClientApplication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) |