mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
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:
parent
a400572be9
commit
1509862b09
1 changed files with 21 additions and 4 deletions
|
@ -3358,13 +3358,30 @@ 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;
|
||||
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);
|
||||
#define SHOWNET2(x, y) if(cl_shownet.value==2)Con_Printf ("%3i:%3i:%s\n", msg_readcount-1, y, x);
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue