mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-21 20:49:31 +01:00
(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.
This commit is contained in:
parent
9c4b5e32fa
commit
1967084bc3
@ -49,8 +49,8 @@ static void NetworkGameListHandleDelayedInsert()
|
||||
NetworkGameList *item = NetworkGameListAddItem(ins_item->address);
|
||||
|
||||
if (item != NULL) {
|
||||
ClearGRFConfigList(&item->info.grfconfig);
|
||||
if (StrEmpty(item->info.server_name)) {
|
||||
ClearGRFConfigList(&item->info.grfconfig);
|
||||
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.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 */
|
||||
item = NetworkGameListAddItem(*client_addr);
|
||||
|
||||
ClearGRFConfigList(&item->info.grfconfig);
|
||||
this->Recv_NetworkGameInfo(p, &item->info);
|
||||
|
||||
item->info.compatible = true;
|
||||
|
Loading…
Reference in New Issue
Block a user