mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Disallow formspec debug if the player does not have the debug privilege (#14753)
This commit is contained in:
parent
fac9aac821
commit
fe6da3a16b
3 changed files with 13 additions and 2 deletions
|
@ -4184,8 +4184,10 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
|
|||
m_client->makeScreenshot();
|
||||
}
|
||||
|
||||
if (event.KeyInput.PressedDown && kp == getKeySetting("keymap_toggle_debug"))
|
||||
m_show_debug = !m_show_debug;
|
||||
if (event.KeyInput.PressedDown && kp == getKeySetting("keymap_toggle_debug")) {
|
||||
if (!m_client || m_client->checkPrivilege("debug"))
|
||||
m_show_debug = !m_show_debug;
|
||||
}
|
||||
|
||||
if (event.KeyInput.PressedDown &&
|
||||
(event.KeyInput.Key==KEY_RETURN ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue