1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 16:39:09 +00:00

(svn r1106) -Add: [Network] Added master-server protocol and advertise to

master-server option. No GUI yet, and disabled by default (it still is WIP)
This commit is contained in:
truelight
2004-12-15 20:10:34 +00:00
parent d867a845fd
commit 015fb81810
6 changed files with 57 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
#include "table/strings.h"
#include "network_server.h"
#include "network_udp.h"
#include "console.h"
#include "command.h"
#include "gfx.h"
@@ -1198,7 +1199,7 @@ void NetworkPopulateCompanyInfo(void)
if (ci != NULL && ci->client_playas > 0 && ci->client_playas <= MAX_PLAYERS) {
if (strlen(_network_player_info[ci->client_playas-1].players) != 0)
strncat(_network_player_info[ci->client_playas-1].players, ", ", sizeof(_network_player_info[ci->client_playas-1].players));
strncat(_network_player_info[ci->client_playas-1].players, client_name, sizeof(_network_player_info[ci->client_playas-1].players));
}
}
@@ -1372,6 +1373,9 @@ void NetworkServer_Tick(void)
last_sync_frame = _frame_counter;
}
#endif
/* See if we need to advertise */
NetworkUDPAdvertise();
}
#endif /* ENABLE_NETWORK */