DEADSOFTWARE

net: mostly restored master-comm logic
[d2df-sdl.git] / src / game / g_window.pas
index 3ea192bd998ede79b04215dec5bb09251afb2ab4..8e6bbe80de9c9ed2f53fd5b3191ee183fa5757ae 100644 (file)
@@ -44,7 +44,7 @@ uses
   g_console, e_input, g_options, g_game,
   g_basic, g_textures, e_sound, g_sound, g_menu, ENet, g_net,
   g_map, g_gfx, g_monsters, xprofiler,
-  g_touch, g_gui, g_system;
+  g_touch, g_gui, g_system, g_netmaster;
 
 
 const
@@ -322,7 +322,7 @@ begin
     end;
   end;
 
-{$IFDEF USE_SYSSTUB}
+{$IFNDEF USE_SYSSTUB}
   PrintGLSupportedExtensions;
   glLegacyNPOT := GLExtensionSupported('GL_ARB_texture_non_power_of_two') or GLExtensionSupported('GL_OES_texture_npot');
 {$ELSE}
@@ -334,6 +334,8 @@ begin
   Init;
   Time_Old := sys_GetTicks();
 
+  g_Net_InitLowLevel();
+
   // Êîìàíäíàÿ ñòðîêà
   if (ParamCount > 0) then g_Game_Process_Params();
 
@@ -347,7 +349,11 @@ begin
   // main loop
   while not ProcessMessage() do begin end;
 
+  g_Net_Slist_ShutdownAll();
+
   Release();
+
+  g_Net_DeinitLowLevel();
   result := 0;
 end;