DEADSOFTWARE

disable menu handling in headless version
[d2df-sdl.git] / src / game / g_window.pas
index d790c4f852c9f468bd51c39ba4a9fd1b221faa20..b8d0921b589b98eb4190e598cd1f8ea32766a41f 100644 (file)
@@ -823,14 +823,17 @@ begin
       end;
     end;
 
+{$IFNDEF HEADLESS}
     if forceUpdate then
     begin
       DrawMenuBackground('INTER');
       e_DarkenQuadWH(0, 0, gScreenWidth, gScreenHeight, 150);
 
       DrawLoadingStat();
+      g_Console_Draw(True);
       SwapBuffers();
     end;
+{$ENDIF}
   end;
 
   e_SoundUpdate();
@@ -900,6 +903,8 @@ begin
     else if (NetMode = NET_CLIENT) then g_Net_Client_Update();
   end;
 
+  if NetMode = NET_SERVER then g_Net_Flush();
+
   g_Map_ProfilersEnd();
   g_Mons_ProfilersEnd();
 
@@ -1174,8 +1179,10 @@ begin
   // Êîìàíäíàÿ ñòðîêà
   if (ParamCount > 0) then g_Game_Process_Params();
 
+{$IFNDEF HEADLESS}
   // Çàïðîñ ÿçûêà
   if (not gGameOn) and gAskLanguage then g_Menu_AskLanguage();
+{$ENDIF}
 
   e_WriteLog('Entering the main loop', TMsgType.Notify);