static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *addressstring)
{
int n;
- int pingtime;
serverlist_entry_t *entry = NULL;
// search the cache for this server and update it
++serverlist_cachecount;
}
// if this is the first reply from this server, count it as having replied
- pingtime = (int)((realtime - entry->querytime) * 1000.0 + 0.5);
- pingtime = bound(0, pingtime, 9999);
+ entry->info.ping = bound(0, (int)floor((realtime - entry->querytime) * 1000 + 0.5),9999);
if (entry->query == SQS_REFRESHING) {
- entry->info.ping = pingtime;
entry->query = SQS_QUERIED;
} else {
- // convert to unsigned to catch the -1
- // I still dont like this but its better than the old 10000 magic ping number - as in easier to type and read :( [11/8/2007 Black]
- entry->info.ping = min((unsigned) entry->info.ping, (unsigned) pingtime);
serverreplycount++;
}