aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-01-30 21:32:49 +0100
committerGitHub <noreply@github.com>2022-01-30 21:32:49 +0100
commit5da204f5bcda7a45ce17f04651627fd8a9d70a82 (patch)
treea8574947ce21c17bfd852bd6473c28a05d28f893 /src
parentb66477c29f50c52c102be6412bb1754e0cfed143 (diff)
downloadminetest-5da204f5bcda7a45ce17f04651627fd8a9d70a82.tar.gz
minetest-5da204f5bcda7a45ce17f04651627fd8a9d70a82.tar.bz2
minetest-5da204f5bcda7a45ce17f04651627fd8a9d70a82.zip
Get rid of `basic_debug` last minute
This isn't a revert but rather just disables the codepaths. also see #12011
Diffstat (limited to 'src')
-rw-r--r--src/client/game.cpp18
-rw-r--r--src/client/gameui.cpp1
-rw-r--r--src/network/clientpackethandler.cpp5
-rw-r--r--src/network/networkprotocol.h1
4 files changed, 8 insertions, 17 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 8959b5f15..4337d308e 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -1740,7 +1740,7 @@ void Game::processQueues()
void Game::updateDebugState()
{
- bool has_basic_debug = client->checkPrivilege("basic_debug");
+ const bool has_basic_debug = true;
bool has_debug = client->checkPrivilege("debug");
if (m_game_ui->m_flags.show_basic_debug) {
@@ -2211,7 +2211,7 @@ void Game::toggleCinematic()
void Game::toggleBlockBounds()
{
- if (client->checkPrivilege("basic_debug")) {
+ if (true /* basic_debug */) {
enum Hud::BlockBoundsMode newmode = hud->toggleBlockBounds();
switch (newmode) {
case Hud::BLOCK_BOUNDS_OFF:
@@ -2307,26 +2307,24 @@ void Game::toggleDebug()
// The debug text can be in 2 modes: minimal and basic.
// * Minimal: Only technical client info that not gameplay-relevant
// * Basic: Info that might give gameplay advantage, e.g. pos, angle
- // Basic mode is used when player has "basic_debug" priv,
- // otherwise the Minimal mode is used.
+ // Basic mode is always used.
+
+ const bool has_basic_debug = true;
if (!m_game_ui->m_flags.show_minimal_debug) {
m_game_ui->m_flags.show_minimal_debug = true;
- if (client->checkPrivilege("basic_debug")) {
+ if (has_basic_debug)
m_game_ui->m_flags.show_basic_debug = true;
- }
m_game_ui->m_flags.show_profiler_graph = false;
draw_control->show_wireframe = false;
m_game_ui->showTranslatedStatusText("Debug info shown");
} else if (!m_game_ui->m_flags.show_profiler_graph && !draw_control->show_wireframe) {
- if (client->checkPrivilege("basic_debug")) {
+ if (has_basic_debug)
m_game_ui->m_flags.show_basic_debug = true;
- }
m_game_ui->m_flags.show_profiler_graph = true;
m_game_ui->showTranslatedStatusText("Profiler graph shown");
} else if (!draw_control->show_wireframe && client->checkPrivilege("debug")) {
- if (client->checkPrivilege("basic_debug")) {
+ if (has_basic_debug)
m_game_ui->m_flags.show_basic_debug = true;
- }
m_game_ui->m_flags.show_profiler_graph = false;
draw_control->show_wireframe = true;
m_game_ui->showTranslatedStatusText("Wireframe shown");
diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp
index bae5241b1..8505ea3ae 100644
--- a/src/client/gameui.cpp
+++ b/src/client/gameui.cpp
@@ -210,7 +210,6 @@ void GameUI::initFlags()
{
m_flags = GameUI::Flags();
m_flags.show_minimal_debug = g_settings->getBool("show_debug");
- m_flags.show_basic_debug = false;
}
void GameUI::showMinimap(bool show)
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 47f259b92..48ad60ac6 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -900,11 +900,6 @@ void Client::handleCommand_Privileges(NetworkPacket* pkt)
m_privileges.insert(priv);
infostream << priv << " ";
}
-
- // Enable basic_debug on server versions before it was added
- if (m_proto_ver < 40)
- m_privileges.insert("basic_debug");
-
infostream << std::endl;
}
diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h
index 7bf5801f5..a5ff53216 100644
--- a/src/network/networkprotocol.h
+++ b/src/network/networkprotocol.h
@@ -206,7 +206,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Adds new sun, moon and stars packets
Minimap modes
PROTOCOL VERSION 40:
- Added 'basic_debug' privilege
TOCLIENT_MEDIA_PUSH changed, TOSERVER_HAVE_MEDIA added
*/