diff --git a/src/d_clisrv.c b/src/d_clisrv.c index aca37df1d..ece74ed4b 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1302,7 +1302,19 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) M_Memcpy(netbuffer->u.serverinfo.mapmd5, mapmd5, 16); if (strcmp(mapheaderinfo[gamemap-1]->lvlttl, "")) - strncpy(netbuffer->u.serverinfo.maptitle, (char *)mapheaderinfo[gamemap-1]->lvlttl, 33); + { + char *read = mapheaderinfo[gamemap-1]->lvlttl, *writ = netbuffer->u.serverinfo.maptitle; + while (*read != '\0' && (read-mapheaderinfo[gamemap-1]->lvlttl) < 33) + { + if (!(*read & 0x80)) + { + *writ = toupper(*read); + writ++; + } + read++; + } + //strncpy(netbuffer->u.serverinfo.maptitle, (char *)mapheaderinfo[gamemap-1]->lvlttl, 33); + } else strncpy(netbuffer->u.serverinfo.maptitle, "UNKNOWN", 33); @@ -1358,7 +1370,11 @@ static void SV_SendPlayerInfo(INT32 node) netbuffer->u.playerinfo[i].score = LONG(players[i].score); netbuffer->u.playerinfo[i].timeinserver = SHORT((UINT16)(players[i].jointime / TICRATE)); - netbuffer->u.playerinfo[i].skin = (UINT8)players[i].skin; + netbuffer->u.playerinfo[i].skin = (UINT8)(players[i].skin +#ifdef DEVELOP // it's safe to do this only because PLAYERINFO isn't read by the game itself + % 3 +#endif + ); // Extra data netbuffer->u.playerinfo[i].data = 0; //players[i].skincolor;