diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp index 267695a4a..caf00245b 100644 --- a/src/game/client/components/scoreboard.cpp +++ b/src/game/client/components/scoreboard.cpp @@ -473,14 +473,24 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch Cursor.m_LineWidth = NameLength; TextRender()->TextEx(&Cursor, m_pClient->m_aClients[pInfo->m_ClientID].m_aName, -1); } - TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); // clan - tw = TextRender()->TextWidth(0, FontSize, m_pClient->m_aClients[pInfo->m_ClientID].m_aClan, -1); - TextRender()->SetCursor(&Cursor, ClanOffset+ClanLength/2-tw/2, y + (LineHeight - FontSize) / 2.f, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END); + if(str_comp(m_pClient->m_aClients[pInfo->m_ClientID].m_aClan, + m_pClient->m_aClients[GameClient()->m_LocalIDs[0]].m_aClan) == 0) + { + vec4 Color = m_pClient->m_pSkins->GetColorV4(g_Config.m_ClSameClanColor); + TextRender()->TextColor(Color.r, Color.g, Color.b, Color.a); + } + else + TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); + + tw = TextRender()->TextWidth(nullptr, FontSize, m_pClient->m_aClients[pInfo->m_ClientID].m_aClan, -1); + TextRender()->SetCursor(&Cursor, ClanOffset + ClanLength / 2 - tw / 2, y + (LineHeight - FontSize) / 2.f, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END); Cursor.m_LineWidth = ClanLength; TextRender()->TextEx(&Cursor, m_pClient->m_aClients[pInfo->m_ClientID].m_aClan, -1); + TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); + // country flag vec4 Color(1.0f, 1.0f, 1.0f, 0.5f); m_pClient->m_pCountryFlags->Render(m_pClient->m_aClients[pInfo->m_ClientID].m_Country, &Color, diff --git a/src/game/variables.h b/src/game/variables.h index 8f8640eff..d78b527ea 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -20,6 +20,7 @@ MACRO_CONFIG_INT(ClNameplatesClanSize, cl_nameplates_clan_size, 30, 0, 100, CFGF MACRO_CONFIG_INT(ClNameplatesOwn, cl_nameplates_own, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show own name plate (useful for demo recording)") MACRO_CONFIG_INT(ClTextEntities, cl_text_entities, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Render textual entity data") MACRO_CONFIG_INT(ClAuthedPlayerColor, cl_authed_player_color, 5898183, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Color of name of authenticated player in scoreboard") +MACRO_CONFIG_INT(ClSameClanColor, cl_same_clan_color, 5898183, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Clan color of players with the same clan as you in scoreboard.") MACRO_CONFIG_INT(ClEnablePingColor, cl_enable_ping_color, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Whether ping is colored in scoreboard.") #if defined(__ANDROID__) MACRO_CONFIG_INT(ClAutoswitchWeapons, cl_autoswitch_weapons, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Auto switch weapon on pickup")