if (txt[0] == 1)
{
mask = 128; // go to colored text
- S_LocalSound ("sound/misc/talk.wav");
- // play talk wav
txt++;
}
else if (txt[0] == 2)
}
}
+
+ if( txt[0] == 1 ) {
+ // play talk wav
+ S_LocalSound ("sound/misc/talk.wav");
+ }
}
/* The translation table between the graphical font and plain ASCII --KB */
// iterate until we get the next color tag or reach the end of the text part to draw
for( ; len && *last != _con_color_tag ; len--, last++ )
;
- // dont do anything if we havent read anything yet
- if( last != text ) {
+ // only draw the partial string if we have read anything
+ if( last != first ) {
// draw the string
DrawQ_String( x, y, first, last - first, scalex, scaley, color[0], color[1], color[2], color[3], flags );
// update x to be at the new start position
Con_Print("received server list...\n");
while (length >= 7 && data[0] == '\\' && (data[1] != 0xFF || data[2] != 0xFF || data[3] != 0xFF || data[4] != 0xFF) && data[5] * 256 + data[6] != 0)
{
+ int n;
+
serverquerycount++;
dpsnprintf (ipstring, sizeof (ipstring), "%u.%u.%u.%u:%u", data[1], data[2], data[3], data[4], (data[5] << 8) | data[6]);
// ignore the rest of the message if the hostcache is full
if( hostcache_cachecount == HOSTCACHE_TOTALSIZE )
break;
+ // also ignore it if we have already queried it (other master server response)
+ for( n = 0 ; n < hostcache_cachecount ; n++ )
+ if( !strcmp( ipstring, hostcache_cache[ n ].info.cname ) )
+ break;
+ if( n < hostcache_cachecount )
+ break;
LHNETADDRESS_FromString(&svaddress, ipstring, 0);
NetConn_WriteString(mysocket, "\377\377\377\377getinfo", &svaddress);