Make chat colours come out the same as for TF teams. It's a bit friendlier this way.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@703 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-01-04 07:20:13 +00:00
parent a400572be9
commit 1509862b09
1 changed files with 21 additions and 4 deletions

View File

@ -3358,11 +3358,28 @@ int getplayerchatcolour(char *msg)
id = getplayerid(msg);
if (id == -1) //not a user/server
return 1;
//primary override.
msg = Info_ValueForKey(cl.players[id].userinfo, "tc");
if (!*msg)
return cl.players[id].userid;
c = atoi(msg);
return c;
if (*msg)
{
c = atoi(msg);
return c;
}
//override based on team
if (cl.teamfortress)
{
switch (cl.players[id].bottomcolor)
{ //translate q1 skin colours to console colours
case 4: //red
return 1;
case 13: //blue
return 5;
//fixme: add the others
}
}
return cl.players[id].userid;
}
#define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);