Format cl_showid a bit nicer

This commit is contained in:
def 2016-01-10 22:35:14 +01:00
parent db857e7130
commit ac61c8fed5

View file

@ -449,7 +449,10 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
if(g_Config.m_ClShowIDs) if(g_Config.m_ClShowIDs)
{ {
char aId[64] = ""; char aId[64] = "";
str_format(aId, sizeof(aId),"%d: ", pInfo->m_ClientID); if (pInfo->m_ClientID >= 10)
str_format(aId, sizeof(aId),"%d: ", pInfo->m_ClientID);
else
str_format(aId, sizeof(aId),"%d: ", pInfo->m_ClientID);
str_append(aId, m_pClient->m_aClients[pInfo->m_ClientID].m_aName,sizeof(aId)); str_append(aId, m_pClient->m_aClients[pInfo->m_ClientID].m_aName,sizeof(aId));
Cursor.m_LineWidth = NameLength+3; Cursor.m_LineWidth = NameLength+3;
TextRender()->TextEx(&Cursor, aId, -1); TextRender()->TextEx(&Cursor, aId, -1);