X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_net.pas;h=11acd5f079370213b7f3db2e0c7799149a4670d2;hp=c01efd1652b7c83ab1a40d455ce940a9d3554c6e;hb=2304c541d7bdbf7de389437482ecdff37fc7fbd5;hpb=d0b0281c7613f63a3ea717a107ae2609669d1da7 diff --git a/src/game/g_net.pas b/src/game/g_net.pas index c01efd1..11acd5f 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -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;