aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Müller <34514239+appgurueu@users.noreply.github.com>2022-04-21 21:45:47 +0200
committerGitHub <noreply@github.com>2022-04-21 21:45:47 +0200
commit4558793caf48d63c74574ba740a96c92d0afcc2c (patch)
treeccebb71fa7264de250a1b540e84691fb5fe40cff /src
parent583257f093b958be7e4e82803f53550e4a3beb8a (diff)
downloadminetest-4558793caf48d63c74574ba740a96c92d0afcc2c.tar.gz
minetest-4558793caf48d63c74574ba740a96c92d0afcc2c.tar.bz2
minetest-4558793caf48d63c74574ba740a96c92d0afcc2c.zip
Fix some debug info showing despite being disabled in the UI (#12205)
Diffstat (limited to 'src')
-rw-r--r--src/client/game.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index edc69dcc2..b877ba04a 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -3157,8 +3157,9 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud)
handlePointingAtNode(pointed, selected_item, hand_item, dtime);
} else if (pointed.type == POINTEDTHING_OBJECT) {
v3f player_position = player->getPosition();
+ bool basic_debug_allowed = client->checkPrivilege("debug") || (player->hud_flags & HUD_FLAG_BASIC_DEBUG);
handlePointingAtObject(pointed, tool_item, player_position,
- client->checkPrivilege("debug") || (player->hud_flags & HUD_FLAG_BASIC_DEBUG));
+ m_game_ui->m_flags.show_basic_debug && basic_debug_allowed);
} else if (isKeyDown(KeyType::DIG)) {
// When button is held down in air, show continuous animation
runData.punching = true;