DEADSOFTWARE

Net: Headless server starts with 0 players by default
authorfgsfds <pvt.fgsfds@gmail.com>
Mon, 5 Aug 2019 18:13:13 +0000 (21:13 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Mon, 5 Aug 2019 18:13:13 +0000 (21:13 +0300)
src/game/g_game.pas

index 7a1f2978e5f18dd9d594cd83b157422f072e3d3c..35f667bf432ce2678561f40920e28d44ac93df0f 100644 (file)
@@ -217,6 +217,12 @@ const
 
   STD_PLAYER_MODEL = 'Doomer';
 
+{$IFDEF HEADLESS}
+  DEFAULT_PLAYERS = 0;
+{$ELSE}
+  DEFAULT_PLAYERS = 1;
+{$ENDIF}
+
 var
   gStdFont: DWORD;
   gGameSettings: TGameSettings;
@@ -7806,9 +7812,9 @@ begin
   // Number of players:
     s := Find_Param_Value(pars, '-pl');
     if (s = '') then
-      n := 1
+      n := DEFAULT_PLAYERS
     else
-      n := StrToIntDef(s, 1);
+      n := StrToIntDef(s, DEFAULT_PLAYERS);
 
   // Start:
     s := Find_Param_Value(pars, '-port');