diff --git a/src/game/client/components/bindwheel.cpp b/src/game/client/components/bindwheel.cpp index 6405faecb..e65e240e5 100644 --- a/src/game/client/components/bindwheel.cpp +++ b/src/game/client/components/bindwheel.cpp @@ -120,15 +120,32 @@ bool CBindWheel::OnCursorMove(float x, float y, IInput::ECursorType CursorType) void CBindWheel::OnRender() { - if(!m_Active) + //FUCK YOU!!! { - if(m_WasActive && !m_vBinds.empty() && m_Choose != -1) - UseBind(); - m_WasActive = false; + static int outliner = -1; - return; + if (!m_Active) + { + // Restore the original value only if it was altered + if (outliner != -1) + { + g_Config.m_ClOutline = outliner; + outliner = -1; + } + return; + + } + + if (m_Active) + { + if (outliner == -1) + { + + outliner = g_Config.m_ClOutline; + } + g_Config.m_ClOutline = 0; + } } - m_WasActive = true; CUIRect Screen = *UI()->Screen(); diff --git a/src/game/client/components/bindwheel.h b/src/game/client/components/bindwheel.h index 2f7726c8d..0469018f4 100644 --- a/src/game/client/components/bindwheel.h +++ b/src/game/client/components/bindwheel.h @@ -14,8 +14,8 @@ enum class CBindWheel : public CComponent { vec2 m_MousePos; - bool m_WasActive; int m_Choose; + bool m_Active; static void ConBindWheel(IConsole::IResult *pResult, void *pUserData); static void ConNewBindWheel(IConsole::IResult *pResult, void *pUserData); @@ -24,7 +24,7 @@ class CBindWheel : public CComponent void UseBind(); public: - bool m_Active; + virtual int Sizeof() const override { return sizeof(*this); } struct SBind { diff --git a/src/game/client/components/menus_start.cpp b/src/game/client/components/menus_start.cpp index 8e4ca8a86..12a17d3ff 100644 --- a/src/game/client/components/menus_start.cpp +++ b/src/game/client/components/menus_start.cpp @@ -118,22 +118,27 @@ std::vector quotes = { "there's 0.0001% to get special rainbow text, gl^^", "https://open.spotify.com/track/1SQDvOrbSykg0lP5y7EQ8o?si=a002ae00a4eb4935", "Don't use M-Client V3", - "Super rare text you might see once in your life", }; -// Function to get a random quote -std::string GetRandomQuote() { +std::vector rares = { + "no fucking way you read this..." +}; - std::srand(std::time(nullptr)); +// Function to get a random quote +std::string GetRandomQuote() { + // Seed the random number generator + std::srand(static_cast(std::time(nullptr))); - int randomNum = std::rand() % 10000 + 1; + // Generate a random number between 0 and 9999 + int randomNum = std::rand() % 10000; - if (randomNum == 1) { - return quotes.back(); // Return the super rare quote + // Check if the random number falls in the 0.01% range + if (randomNum < 1) { + return rares[0]; // Return the super rare quote } else { - + // Otherwise, return a regular quote int index = std::rand() % quotes.size(); return quotes[index]; } @@ -355,13 +360,13 @@ void CMenus::RenderStartMenu(CUIRect MainView) dbg_msg("Quotes", "%s", randomQuote.c_str()); } - if(!str_comp(randomQuote.c_str(), "Super rare text you might see once in your life")) + if(!str_comp(randomQuote.c_str(), "no fucking way you read this...")) { ColorRGBA color = color_cast(ColorHSVA(round_to_int(LocalTime() * 25) % 255 / 255.f, 1.f, 1.f)); color.a = 0.9f; TextRender()->TextColor(color); - UI()->DoLabel(&RandomText, "Super rare text you might see once in your life", 20.0f, TEXTALIGN_ML); + UI()->DoLabel(&RandomText, "no fucking way you read this...", 20.0f, TEXTALIGN_ML); TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); } else diff --git a/src/game/client/components/outlines.cpp b/src/game/client/components/outlines.cpp index 281877cfb..ed2c6cb07 100644 --- a/src/game/client/components/outlines.cpp +++ b/src/game/client/components/outlines.cpp @@ -8,12 +8,9 @@ #include #include #include "outlines.h" -#include "bindwheel.h" void COutlines::OnRender() { - if(CBindWheel().m_Active) - return; if(GameClient()->m_MapLayersBackground.m_OnlineOnly && Client()->State() != IClient::STATE_ONLINE && Client()->State() != IClient::STATE_DEMOPLAYBACK) return; diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp index 47c020103..308a60cfe 100644 --- a/src/game/client/components/scoreboard.cpp +++ b/src/game/client/components/scoreboard.cpp @@ -466,19 +466,18 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch // Set the cursor for the name rendering TextRender()->SetCursor(&Cursor, NameOffset, y + (LineHeight - FontSize) / 2.f, FontSize, TEXTFLAG_RENDER | TEXTFLAG_ELLIPSIS_AT_END); - // Check if the player is authorized and apply the authorization color if they are + if(m_pClient->m_aClients[pInfo->m_ClientID].m_AuthLevel) { ColorRGBA Color = color_cast(ColorHSLA(g_Config.m_ClAuthedPlayerColor)); TextRender()->TextColor(Color); } - else if(m_pClient->m_aClients[pInfo->m_ClientID].m_Friend) // Check if the player is a friend only if they are not authorized + else if(m_pClient->m_aClients[pInfo->m_ClientID].m_Friend) { ColorRGBA Color = color_cast(ColorHSLA(g_Config.m_ScFriendColor)); TextRender()->TextColor(Color); } - //not fwends:3 TextRender()->SetCursor(&Cursor, NameOffset, y + (LineHeight - FontSize) / 2.f, FontSize, TEXTFLAG_RENDER | TEXTFLAG_ELLIPSIS_AT_END); if(m_pClient->m_aClients[pInfo->m_ClientID].m_Foe) {