Added id numbers to the scoreboard. Closes #71.

added shortcuts to the gitignore
This commit is contained in:
GreYFoXGTi 2010-10-12 15:12:44 +02:00
parent d1129b7fce
commit 921dd65d3d
2 changed files with 9 additions and 2 deletions

3
.gitignore vendored
View file

@ -26,4 +26,5 @@ DDRace_Trunk_d*
*.res
*.dll
*.patch
*.prefs
*.prefs
*.lnk

View file

@ -107,6 +107,9 @@ void CScoreboard::RenderSpectators(float x, float y, float w)
{
if(Count)
str_append(aBuffer, ", ", sizeof(aBuffer));
char aId[3];
str_format(aId,sizeof(aId),"%d:",pInfo->m_ClientId);
str_append(aBuffer, aId, sizeof(aBuffer));
str_append(aBuffer, m_pClient->m_aClients[pInfo->m_ClientId].m_aName, sizeof(aBuffer));
Count++;
}
@ -242,7 +245,10 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
FontSizeResize = FontSize;
while(TextRender()->TextWidth(0, FontSizeResize, m_pClient->m_aClients[pInfo->m_ClientId].m_aName, -1) > w-163.0f-PingWidth)
--FontSizeResize;
TextRender()->Text(0, x+128.0f, y+(FontSize-FontSizeResize)/2, FontSizeResize, m_pClient->m_aClients[pInfo->m_ClientId].m_aName, -1);
char aId[64];
str_format(aId,sizeof(aId),"%d:",pInfo->m_ClientId);
str_append(aId, m_pClient->m_aClients[pInfo->m_ClientId].m_aName,sizeof(aId));
TextRender()->Text(0, x+128.0f, y+(FontSize-FontSizeResize)/2, FontSizeResize, aId, -1);
FontSizeResize = FontSize;
str_format(aBuf, sizeof(aBuf), "%d", clamp(pInfo->m_Latency, -9999, 9999));