mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00: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:
parent
7c261118e0
commit
051181fa6e
28 changed files with 74 additions and 56 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue