Add spectator clans rendering in scoreboard

Show client ID before spectator clan
This commit is contained in:
gerdoe-jr 2024-07-10 21:50:45 +03:00 committed by heinrich5991
parent ef6fd80bc5
commit ae364942c8

View file

@ -199,17 +199,39 @@ void CScoreboard::RenderSpectators(CUIRect Spectators)
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)
{
char aClientId[5];
str_format(aClientId, sizeof(aClientId), "%d: ", pInfo->m_ClientId);
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()->TextColor(TextRender()->DefaultTextColor());