(svn r10694) -Codechange: update the server information in the game list every once in a while so the information stays fairly up-to-date when you are looking through the servers.

This commit is contained in:
rubidium
2007-07-26 09:53:58 +00:00
parent 6f12d2997c
commit fda75ae603
2 changed files with 13 additions and 18 deletions

View File

@@ -490,10 +490,12 @@ void NetworkUDPQueryServer(const char* host, unsigned short port, bool manually)
// Clear item in gamelist
item = NetworkGameListAddItem(inet_addr(inet_ntoa(out_addr.sin_addr)), ntohs(out_addr.sin_port));
memset(&item->info, 0, sizeof(item->info));
ttd_strlcpy(item->info.server_name, host, lengthof(item->info.server_name));
ttd_strlcpy(item->info.hostname, host, lengthof(item->info.hostname));
item->online = false;
if (StrEmpty(item->info.server_name)) {
memset(&item->info, 0, sizeof(item->info));
ttd_strlcpy(item->info.server_name, host, lengthof(item->info.server_name));
ttd_strlcpy(item->info.hostname, host, lengthof(item->info.hostname));
item->online = false;
}
item->manually = manually;
// Init the packet