Added QTV colouring and stuph.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1391 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5845f5a2d6
commit
b9bc54f3a4
2 changed files with 30 additions and 4 deletions
|
@ -39,6 +39,9 @@ cvar_t sb_showtimelimit = {"sb_showtimelimit", "0", NULL, CVAR_ARCHIVE};
|
|||
cvar_t sb_filterkey = {"sb_filterkey", "hostname", NULL, CVAR_ARCHIVE};
|
||||
cvar_t sb_filtervalue = {"sb_filtervalue", "", NULL, CVAR_ARCHIVE};
|
||||
|
||||
extern cvar_t slist_writeserverstxt;
|
||||
extern cvar_t slist_cacheinfo;
|
||||
|
||||
void M_Serverlist_Init(void)
|
||||
{
|
||||
char *grp = "Server Browser Vars";
|
||||
|
@ -63,6 +66,9 @@ void M_Serverlist_Init(void)
|
|||
Cvar_Register(&sb_showplayers, grp);
|
||||
Cvar_Register(&sb_showfraglimit, grp);
|
||||
Cvar_Register(&sb_showtimelimit, grp);
|
||||
|
||||
Cvar_Register(&slist_writeserverstxt, grp);
|
||||
Cvar_Register(&slist_cacheinfo, grp);
|
||||
}
|
||||
|
||||
|
||||
|
@ -367,9 +373,7 @@ void M_DrawServerList(void)
|
|||
blink = (int)(realtime*3)&1;
|
||||
if (*server->name)
|
||||
{
|
||||
if (blink)
|
||||
colour = COLOR_CYAN;
|
||||
else if (server->special & SS_FAVORITE)
|
||||
if (server->special & SS_FAVORITE)
|
||||
colour = COLOR_GREEN;
|
||||
else if (server->special & SS_FTESERVER)
|
||||
colour = COLOR_RED;
|
||||
|
@ -378,10 +382,20 @@ void M_DrawServerList(void)
|
|||
else if (server->special & SS_QUAKE3)
|
||||
colour = COLOR_BLUE;
|
||||
else if (server->special & SS_NETQUAKE)
|
||||
colour = COLOR_WHITE;
|
||||
else if (server->special & SS_QTV)
|
||||
colour = COLOR_MAGENTA;
|
||||
else
|
||||
colour = COLOR_WHITE;
|
||||
|
||||
if (blink)
|
||||
{
|
||||
if (server->special & SS_NETQUAKE)
|
||||
colour = COLOR_MAGENTA; //nq blinks magenta
|
||||
else
|
||||
colour = COLOR_CYAN;
|
||||
}
|
||||
|
||||
x = vid.width;
|
||||
|
||||
if (sb_showtimelimit.value)
|
||||
|
|
|
@ -1095,6 +1095,9 @@ void MasterInfo_WriteServers(void)
|
|||
case MT_MASTERDP:
|
||||
typename = "master:dp";
|
||||
break;
|
||||
case MT_MASTERHTTP:
|
||||
typename = "master:http";
|
||||
break;
|
||||
case MT_BCASTQW:
|
||||
typename = "bcast:qw";
|
||||
break;
|
||||
|
@ -1119,10 +1122,16 @@ void MasterInfo_WriteServers(void)
|
|||
case MT_SINGLENQ:
|
||||
typename = "single:nq";
|
||||
break;
|
||||
case MT_SINGLEDP:
|
||||
typename = "single:dp";
|
||||
break;
|
||||
default:
|
||||
typename = "writeerror";
|
||||
}
|
||||
fprintf(mf, "%s\t%s\t%s\n", NET_AdrToString(mast->adr), typename, mast->name);
|
||||
if (mast->address)
|
||||
fprintf(mf, "%s\t%s\t%s\n", mast->address , typename, mast->name);
|
||||
else
|
||||
fprintf(mf, "%s\t%s\t%s\n", NET_AdrToString(mast->adr), typename, mast->name);
|
||||
}
|
||||
|
||||
if (slist_writeserverstxt.value)
|
||||
|
@ -1424,6 +1433,9 @@ int CL_ReadServerInfo(char *msg, int servertype, qboolean favorite)
|
|||
info->tl = atoi(Info_ValueForKey(msg, "timelimit"));
|
||||
info->fl = atoi(Info_ValueForKey(msg, "fraglimit"));
|
||||
|
||||
if (*Info_ValueForKey(msg, "*qtv"))
|
||||
info->special |= SS_QTV;
|
||||
|
||||
if (servertype == MT_SINGLEQ3 || servertype == MT_SINGLEQ2 || servertype == MT_SINGLEDP)
|
||||
{
|
||||
Q_strncpyz(info->gamedir, Info_ValueForKey(msg, "gamename"), sizeof(info->gamedir));
|
||||
|
|
Loading…
Reference in a new issue