From 2198ac5d4e8773444a1413751d3c41b99ae3c5c6 Mon Sep 17 00:00:00 2001 From: eh-K <165239265+eh-K@users.noreply.github.com> Date: Fri, 6 Mar 2026 17:05:49 -0600 Subject: [PATCH] Sets hard cap so #743 doesnt have to happen. --- .../Common/UI/UIScene_DebugSetCamera.cpp | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp b/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp index 62ee60b13..489454c04 100644 --- a/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp @@ -92,11 +92,32 @@ void UIScene_DebugSetCamera::onDirectEditFinished(UIControl_TextInput *input, UI double val = 0; if (!value.empty()) val = _fromString(value); - if (input == &m_textInputX) currentPosition->m_camX = val; - else if (input == &m_textInputY) currentPosition->m_camY = val; - else if (input == &m_textInputZ) currentPosition->m_camZ = val; - else if (input == &m_textInputYRot) currentPosition->m_yRot = val; - else if (input == &m_textInputElevation) currentPosition->m_elev = val; + if (input == &m_textInputX) + { + currentPosition->m_camX = val; + if (val > 30000000) currentPosition->m_camX = 30000000; + + } +else if (input == &m_textInputY) + { + currentPosition->m_camY = val; + if (val > 300) currentPosition->m_camY = 300; + if (val < -16) currentPosition->m_camY = 70; + } + +else if (input == &m_textInputZ) + { + currentPosition->m_camZ = val; + if (val > 30000000) currentPosition->m_camZ = 30000000; + } +else if (input == &m_textInputYRot) + { + currentPosition->m_yRot = val; + } +else if (input == &m_textInputElevation) + { + currentPosition->m_elev = val; + } } bool UIScene_DebugSetCamera::handleMouseClick(F32 x, F32 y)