Merge pull request #8577 from gerdoe-jr/scoreboard-spectator-clans

Scoreboard spectator clans
This commit is contained in:
heinrich5991 2024-08-13 10:19:14 +00:00 committed by GitHub
commit 4cbdf2069c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -199,17 +199,39 @@ void CScoreboard::RenderSpectators(CUIRect Spectators)
break; break;
} }
if(GameClient()->m_aClients[pInfo->m_ClientId].m_AuthLevel)
{
TextRender()->TextColor(color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClAuthedPlayerColor)));
}
if(g_Config.m_ClShowIds) if(g_Config.m_ClShowIds)
{ {
char aClientId[16]; char aClientId[16];
GameClient()->FormatClientId(pInfo->m_ClientId, aClientId, EClientIdFormat::NO_INDENT); GameClient()->FormatClientId(pInfo->m_ClientId, aClientId, EClientIdFormat::NO_INDENT);
TextRender()->TextEx(&Cursor, aClientId); TextRender()->TextEx(&Cursor, aClientId);
} }
{
const char *pClanName = GameClient()->m_aClients[pInfo->m_ClientId].m_aClan;
if(pClanName[0] != '\0')
{
if(str_comp(pClanName, GameClient()->m_aClients[GameClient()->m_aLocalIds[g_Config.m_ClDummy]].m_aClan) == 0)
{
TextRender()->TextColor(color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClSameClanColor)));
}
else
{
TextRender()->TextColor(ColorRGBA(0.7f, 0.7f, 0.7f));
}
TextRender()->TextEx(&Cursor, pClanName);
TextRender()->TextEx(&Cursor, " ");
TextRender()->TextColor(TextRender()->DefaultTextColor());
}
}
if(GameClient()->m_aClients[pInfo->m_ClientId].m_AuthLevel)
{
TextRender()->TextColor(color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClAuthedPlayerColor)));
}
TextRender()->TextEx(&Cursor, GameClient()->m_aClients[pInfo->m_ClientId].m_aName); TextRender()->TextEx(&Cursor, GameClient()->m_aClients[pInfo->m_ClientId].m_aName);
TextRender()->TextColor(TextRender()->DefaultTextColor()); TextRender()->TextColor(TextRender()->DefaultTextColor());