Show IDs in scoreboard on any server type

This commit is contained in:
def 2014-08-23 11:32:54 +02:00
parent 803745fee1
commit d08e58daa8

View file

@ -128,13 +128,12 @@ void CScoreboard::RenderSpectators(float x, float y, float w)
if(Multiple) if(Multiple)
str_append(aBuffer, ", ", sizeof(aBuffer)); str_append(aBuffer, ", ", sizeof(aBuffer));
if(m_IsGameTypeRace) if(g_Config.m_ClShowIDs)
if (g_Config.m_ClShowIDs) {
{ char aId[4];
char aId[4]; str_format(aId,sizeof(aId),"%d:",pInfo->m_ClientID);
str_format(aId,sizeof(aId),"%d:",pInfo->m_ClientID); str_append(aBuffer, aId, sizeof(aBuffer));
str_append(aBuffer, aId, sizeof(aBuffer)); }
}
str_append(aBuffer, m_pClient->m_aClients[pInfo->m_ClientID].m_aName, sizeof(aBuffer)); str_append(aBuffer, m_pClient->m_aClients[pInfo->m_ClientID].m_aName, sizeof(aBuffer));
Multiple = true; Multiple = true;
} }
@ -448,7 +447,7 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
// name // name
TextRender()->SetCursor(&Cursor, NameOffset, y+Spacing, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END); TextRender()->SetCursor(&Cursor, NameOffset, y+Spacing, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
if (m_IsGameTypeRace && g_Config.m_ClShowIDs) if(g_Config.m_ClShowIDs)
{ {
char aId[64] = ""; char aId[64] = "";
str_format(aId, sizeof(aId),"%d:", pInfo->m_ClientID); str_format(aId, sizeof(aId),"%d:", pInfo->m_ClientID);