(svn r1194) Feature: You can now add and remove servers from the server list. Those will be remembered until you delete them by pressing the Delete key.

This commit is contained in:
dominik
2004-12-20 22:14:39 +00:00
parent 7875eb7c64
commit f5ccb662f8
9 changed files with 107 additions and 24 deletions

View File

@@ -434,7 +434,7 @@ void NetworkUDPSearchGame(void)
_network_udp_broadcast = 300; // Stay searching for 300 ticks
}
void NetworkUDPQueryServer(const byte* host, unsigned short port)
NetworkGameList *NetworkUDPQueryServer(const byte* host, unsigned short port)
{
struct sockaddr_in out_addr;
Packet *p;
@@ -444,7 +444,7 @@ void NetworkUDPQueryServer(const byte* host, unsigned short port)
// No UDP-socket yet..
if (_udp_client_socket == INVALID_SOCKET)
if (!NetworkUDPListen(0, 0))
return;
return NULL;
ttd_strlcpy(hostname, host, sizeof(hostname));
@@ -467,6 +467,7 @@ void NetworkUDPQueryServer(const byte* host, unsigned short port)
free(p);
UpdateNetworkGameWindow(false);
return item;
}
/* Register us to the master server