DEADSOFTWARE

Net: Don't process network in ProcessLoading() for client's code
[d2df-sdl.git] / src / game / g_game.pas
index 261d5e9fe19c34c3fc46c193c917ba7b7cee43ce..b1a10ea8ba434ccaf0394d86b186678309e2ffaa 100644 (file)
@@ -4854,12 +4854,6 @@ begin
     begin
       if (NetEvent.kind = ENET_EVENT_TYPE_RECEIVE) then
       begin
-        if (NetEvent.channelID = NET_CHAN_DOWNLOAD_EX) then
-        begin
-          // ignore all download packets, they're processed by separate code
-          enet_packet_destroy(NetEvent.packet);
-          continue;
-        end;
         Ptr := NetEvent.packet^.data;
         if not InMsg.Init(Ptr, NetEvent.packet^.dataLength, True) then
         begin
@@ -4959,8 +4953,7 @@ begin
       end;
     end;
 
-    ProcessLoading(true);
-
+    ProcessLoading(True);
     if g_Net_UserRequestExit() then
     begin
       State := 0;
@@ -8308,8 +8301,7 @@ begin
   end;
 
   g_ActiveWindow := nil;
-
-  ProcessLoading(true);
+  ProcessLoading(True);
 end;
 
 procedure g_Game_StepLoading(Value: Integer = -1);
@@ -8323,10 +8315,11 @@ begin
     end
     else
       CurValue := Value;
+
     if (ShowCount > LOADING_SHOW_STEP) or (Value > -1) then
     begin
       ShowCount := 0;
-      ProcessLoading();
+      ProcessLoading(False);
     end;
   end;
 end;