X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fclient%2Fgameui.cpp;h=32396755023d3792c0d44eaf958d8544ef96d078;hb=40bee27e5603a2ed1aff3646fa62661aef55c08a;hp=ebc6b108c85a70e818e1e86b6dae858be1ab362f;hpb=258101a91031f3ff9ee01a974030b02529ffdac0;p=minetest.git diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp index ebc6b108c..323967550 100644 --- a/src/client/gameui.cpp +++ b/src/client/gameui.cpp @@ -99,7 +99,8 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ { v2u32 screensize = RenderingEngine::getWindowSize(); - if (m_flags.show_debug) { + // Minimal debug text must only contain info that can't give a gameplay advantage + if (m_flags.show_minimal_debug) { static float drawtime_avg = 0; drawtime_avg = drawtime_avg * 0.95 + stats.drawtime * 0.05; u16 fps = 1.0 / stats.dtime_jitter.avg; @@ -125,9 +126,10 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ } // Finally set the guitext visible depending on the flag - m_guitext->setVisible(m_flags.show_debug); + m_guitext->setVisible(m_flags.show_minimal_debug); - if (m_flags.show_debug) { + // Basic debug text also shows info that might give a gameplay advantage + if (m_flags.show_basic_debug) { LocalPlayer *player = client->getEnv().getLocalPlayer(); v3f player_position = player->getPosition(); @@ -160,7 +162,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ )); } - m_guitext2->setVisible(m_flags.show_debug); + m_guitext2->setVisible(m_flags.show_basic_debug); setStaticText(m_guitext_info, m_infotext.c_str()); m_guitext_info->setVisible(m_flags.show_hud && g_menumgr.menuCount() == 0); @@ -204,7 +206,8 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ void GameUI::initFlags() { m_flags = GameUI::Flags(); - m_flags.show_debug = g_settings->getBool("show_debug"); + m_flags.show_minimal_debug = g_settings->getBool("show_debug"); + m_flags.show_basic_debug = false; } void GameUI::showMinimap(bool show) @@ -225,8 +228,10 @@ void GameUI::setChatText(const EnrichedString &chat_text, u32 recent_chat_count) // Update gui element size and position s32 chat_y = 5; - if (m_flags.show_debug) - chat_y += 2 * g_fontengine->getLineHeight(); + if (m_flags.show_minimal_debug) + chat_y += g_fontengine->getLineHeight(); + if (m_flags.show_basic_debug) + chat_y += g_fontengine->getLineHeight(); const v2u32 &window_size = RenderingEngine::getWindowSize();