X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_net.pas;h=11acd5f079370213b7f3db2e0c7799149a4670d2;hp=eaf35fad6aadc41d2be339ff12a22c1a9c06a0c1;hb=2304c541d7bdbf7de389437482ecdff37fc7fbd5;hpb=0e101bd452c40da601236aaa2dd4106be47ddce1 diff --git a/src/game/g_net.pas b/src/game/g_net.pas index eaf35fa..11acd5f 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -72,7 +72,7 @@ const BANLIST_FILENAME = 'banlist.txt'; NETDUMP_FILENAME = 'netdump'; - {$IFDEF FREEBSD} + {$IF DEFINED(FREEBSD) OR DEFINED(DARWIN)} NilThreadId = nil; {$ELSE} NilThreadId = 0; @@ -1385,7 +1385,8 @@ begin 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; @@ -1520,7 +1521,8 @@ begin 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); @@ -1590,7 +1592,8 @@ begin 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); @@ -1617,7 +1620,11 @@ begin 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 @@ -1722,7 +1729,11 @@ begin 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;