mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
This commit is contained in:
@@ -843,7 +843,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
|
||||
s32 dy = Y - m_pointerpos[event.TouchInput.ID].Y;
|
||||
|
||||
// adapt to similar behaviour as pc screen
|
||||
double d = g_settings->getFloat("mouse_sensitivity") * 3.0f;
|
||||
const double d = g_settings->getFloat("mouse_sensitivity", 0.001f, 10.0f) * 3.0f;
|
||||
|
||||
m_camera_yaw_change -= dx * d;
|
||||
m_camera_pitch = MYMIN(MYMAX(m_camera_pitch + (dy * d), -180), 180);
|
||||
|
Reference in New Issue
Block a user