From: fgsfds Date: Mon, 5 Aug 2019 18:13:13 +0000 (+0300) Subject: Net: Headless server starts with 0 players by default X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=ed4b63b2ef2ac7127d4129b9f60c1fb37a96697e;p=d2df-sdl.git Net: Headless server starts with 0 players by default --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 7a1f297..35f667b 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -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');