Skip to content
Snippets Groups Projects
Commit e4a5f210 authored by James R.'s avatar James R.
Browse files

Convert caret color codes to SRB2 color codes

parent 26227677
No related branches found
No related tags found
1 merge request!2lol xd
...@@ -3932,12 +3932,15 @@ static void HandleTimeout(SINT8 node) ...@@ -3932,12 +3932,15 @@ static void HandleTimeout(SINT8 node)
*/ */
static void HandleServerInfo(SINT8 node) static void HandleServerInfo(SINT8 node)
{ {
char servername[MAXSERVERNAME];
// compute ping in ms // compute ping in ms
const tic_t ticnow = I_GetTime(); const tic_t ticnow = I_GetTime();
const tic_t ticthen = (tic_t)LONG(netbuffer->u.serverinfo.time); const tic_t ticthen = (tic_t)LONG(netbuffer->u.serverinfo.time);
const tic_t ticdiff = (ticnow - ticthen)*1000/NEWTICRATE; const tic_t ticdiff = (ticnow - ticthen)*1000/NEWTICRATE;
netbuffer->u.serverinfo.time = (tic_t)LONG(ticdiff); netbuffer->u.serverinfo.time = (tic_t)LONG(ticdiff);
netbuffer->u.serverinfo.servername[MAXSERVERNAME-1] = 0; netbuffer->u.serverinfo.servername[MAXSERVERNAME-1] = 0;
memcpy(servername, netbuffer->u.serverinfo.servername, MAXSERVERNAME);
CopyCaretColors(netbuffer->u.serverinfo.servername, servername, MAXSERVERNAME);
netbuffer->u.serverinfo.gametype = (UINT8)((netbuffer->u.serverinfo.gametype == VANILLA_GT_MATCH) ? GT_MATCH : GT_RACE); netbuffer->u.serverinfo.gametype = (UINT8)((netbuffer->u.serverinfo.gametype == VANILLA_GT_MATCH) ? GT_MATCH : GT_RACE);
SL_InsertServer(&netbuffer->u.serverinfo, node); SL_InsertServer(&netbuffer->u.serverinfo, node);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment