diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index ae597dd0..0339f038 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -393,6 +393,9 @@ namespace Components throw new std::exception(); }); + // Dvars + Dvar::Register("ui_streamFriendly", 0, Game::DVAR_FLAG_SAVED, "Stream friendly UI"); + // Debug patches #ifdef DEBUG // ui_debugMode 1 diff --git a/src/Components/Modules/ServerInfo.cpp b/src/Components/Modules/ServerInfo.cpp index 695d4470..c928017e 100644 --- a/src/Components/Modules/ServerInfo.cpp +++ b/src/Components/Modules/ServerInfo.cpp @@ -85,8 +85,12 @@ namespace Components float x = 320.0f - Dvar::Var("cg_scoreboardWidth").Get() * 0.5f; float x2 = 320.0f + Dvar::Var("cg_scoreboardWidth").Get() * 0.5f; - Game::UI_DrawText(cxt, reinterpret_cast(0x7ED3F8), 0x7FFFFFFF, font, x, y, 0, 0, fontSize, reinterpret_cast(0x747F34), 3); - Game::UI_DrawText(cxt, addressText.data(), 0x7FFFFFFF, font, x2 - Game::UI_TextWidth(addressText.data(), 0, font, fontSize), y, 0, 0, fontSize, reinterpret_cast(0x747F34), 3); + // draw only when stream friendly ui is not enabled + if (!Dvar::Var("ui_streamFriendly").Get()) + { + Game::UI_DrawText(cxt, reinterpret_cast(0x7ED3F8), 0x7FFFFFFF, font, x, y, 0, 0, fontSize, reinterpret_cast(0x747F34), 3); + Game::UI_DrawText(cxt, addressText.data(), 0x7FFFFFFF, font, x2 - Game::UI_TextWidth(addressText.data(), 0, font, fontSize), y, 0, 0, fontSize, reinterpret_cast(0x747F34), 3); + } } __declspec(naked) void ServerInfo::DrawScoreboardStub()