diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index eaf35fad6aadc41d2be339ff12a22c1a9c06a0c1..11acd5f079370213b7f3db2e0c7799149a4670d2 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
BANLIST_FILENAME = 'banlist.txt';
NETDUMP_FILENAME = 'netdump';
- {$IFDEF FREEBSD}
+ {$IF DEFINED(FREEBSD) OR DEFINED(DARWIN)}
NilThreadId = nil;
{$ELSE}
NilThreadId = 0;
NetPeer := nil;
NetHost := nil;
- g_Net_Slist_Disconnect(false); // do not spam console
+ g_Net_Slist_NetworkStopped();
+ //g_Net_Slist_Disconnect(false); // do not spam console
NetMyID := -1;
NetPlrUID1 := -1;
NetPlrUID2 := -1;
end;
clearNetClients(false); // don't clear array
- if (g_Net_Slist_IsConnectionActive) then g_Net_Slist_Disconnect;
+ //if (g_Net_Slist_IsConnectionActive) then g_Net_Slist_Disconnect;
+ g_Net_Slist_NetworkStopped();
if NetPongSock <> ENET_SOCKET_NULL then
enet_socket_destroy(NetPongSock);
NetOut.Write(Byte(Ord('F')));
NetOut.Write(NetPort);
NetOut.Write(ClTime);
- g_Net_Slist_WriteInfo();
+ //g_Net_Slist_WriteInfo();
+ TMasterHost.writeInfo(NetOut);
NPl := 0;
if gPlayer1 <> nil then Inc(NPl);
if gPlayer2 <> nil then Inc(NPl);
IP := '';
Result := 0;
- if NetUseMaster then g_Net_Slist_Check;
+ if NetUseMaster then
+ begin
+ //g_Net_Slist_Check;
+ g_Net_Slist_Pulse();
+ end;
g_Net_Host_CheckPings;
while (enet_host_service(NetHost, @NetEvent, 0) > 0) do
g_Console_Add(_lc[I_NET_MSG] + Format(_lc[I_NET_MSG_HOST_DISC], [ID]));
Dec(NetClientCount);
- if NetUseMaster then g_Net_Slist_Update;
+ if NetUseMaster then
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
end;
end;