mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix TouchScreenGUI ignoring server-sent pitch changes
This commit is contained in:
parent
47e557b96a
commit
04dc4a10f0
3 changed files with 8 additions and 4 deletions
|
@ -832,7 +832,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
|
|||
const double d = g_settings->getFloat("touchscreen_sensitivity", 0.001f, 10.0f) * 3.0f;
|
||||
|
||||
m_camera_yaw_change -= dir_free.X * d;
|
||||
m_camera_pitch = MYMIN(MYMAX(m_camera_pitch + (dir_free.Y * d), -180.0f), 180.0f);
|
||||
m_camera_pitch_change += dir_free.Y * d;
|
||||
|
||||
// update shootline
|
||||
// no need to update (X, Y) when using crosshair since the shootline is not used
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue