gui fixes, local player in scoreboard

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1544 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-01-03 11:29:49 +00:00
parent 0b1f05f2e6
commit af8ba0743c
3 changed files with 12 additions and 14 deletions
+2 -2
View File
@@ -62,13 +62,13 @@ static int scorecmp(const playerent **x, const playerent **y)
void renderscore(void *menu, playerent *d)
{
const char *status = "";
static color localplayerc(0.2f, 0.2f, 0.2f, 0.2f);
if(d->clientrole==CR_MASTER) status = "\f0";
else if(d->clientrole==CR_ADMIN) status = "\f3";
else if(d==player1) status = "\f1";
else if(d->state==CS_DEAD) status = "\f4";
s_sprintfd(lag)("%d", d->plag);
sline &line = scorelines.add();
line.bgcolor = NULL;
line.bgcolor = d==player1 ? &localplayerc : NULL;
string &s = line.s;
if(m_ctf) s_sprintf(s)("%d\t%d\t%d\t%s\t%s\t%d\t%s%s", d->flagscore, d->frags, d->deaths(), d->state==CS_LAGGED ? "LAG" : lag, colorping(d->ping), d->clientnum, status, colorname(d));
else if(m_teammode) s_sprintf(s)("%d\t%d\t%s\t%s\t%d\t%s%s", d->frags, d->deaths(), d->state==CS_LAGGED ? "LAG" : lag, colorping(d->ping), d->clientnum, status, colorname(d));