mirror of https://github.com/OpenTTD/OpenTTD
(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.
parent
9c4b5e32fa
commit
1967084bc3
|
@ -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));
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue