DEADSOFTWARE

net: enet+shitdoze == clusterfuck; added workaround for `enet_host_service()` (and...
[d2df-sdl.git] / src / game / g_game.pas
index 30e6993bcc6f746d57eaba21cc2931be4b531a60..22265652546f9a396905fc16ddd1d86ada2eb107 100644 (file)
@@ -4542,7 +4542,7 @@ begin
     Exit;
   end;
 
-  g_Net_Slist_Set(NetSlistIP, NetSlistPort);
+  g_Net_Slist_Set(NetSlistIP, NetSlistPort, NetSlistList);
 
   g_Net_Slist_ServerStarted();
 
@@ -4630,6 +4630,9 @@ begin
   OuterLoop := True;
   while OuterLoop do
   begin
+    // fuck! https://www.mail-archive.com/enet-discuss@cubik.org/msg00852.html
+    // tl;dr: on shitdows, we can get -1 sometimes, and it is *NOT* a failure.
+    //        thank you, enet. let's ignore failures altogether then.
     while (enet_host_service(NetHost, @NetEvent, 50) > 0) do
     begin
       if (NetEvent.kind = ENET_EVENT_TYPE_RECEIVE) then