1
0
Fork 0

(svn r18746) -Fix [FS#3489]: clear the cached NewGRFs of a server when receiving a reply instead of when requesting the information. With slow/unstable network connections it would look like the NewGRF settings button went randomly missing.

release/1.0
rubidium 2010-01-06 20:49:24 +00:00
parent 9c4b5e32fa
commit 1967084bc3
2 changed files with 2 additions and 1 deletions

View File

@ -49,8 +49,8 @@ static void NetworkGameListHandleDelayedInsert()
NetworkGameList *item = NetworkGameListAddItem(ins_item->address); NetworkGameList *item = NetworkGameListAddItem(ins_item->address);
if (item != NULL) { if (item != NULL) {
ClearGRFConfigList(&item->info.grfconfig);
if (StrEmpty(item->info.server_name)) { if (StrEmpty(item->info.server_name)) {
ClearGRFConfigList(&item->info.grfconfig);
memset(&item->info, 0, sizeof(item->info)); memset(&item->info, 0, sizeof(item->info));
strecpy(item->info.server_name, ins_item->info.server_name, lastof(item->info.server_name)); strecpy(item->info.server_name, ins_item->info.server_name, lastof(item->info.server_name));
strecpy(item->info.hostname, ins_item->info.hostname, lastof(item->info.hostname)); strecpy(item->info.hostname, ins_item->info.hostname, lastof(item->info.hostname));

View File

@ -237,6 +237,7 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE)
/* Find next item */ /* Find next item */
item = NetworkGameListAddItem(*client_addr); item = NetworkGameListAddItem(*client_addr);
ClearGRFConfigList(&item->info.grfconfig);
this->Recv_NetworkGameInfo(p, &item->info); this->Recv_NetworkGameInfo(p, &item->info);
item->info.compatible = true; item->info.compatible = true;