From: TerminalHash Date: Wed, 26 Apr 2023 09:37:57 +0000 (+0300) Subject: net: a more elegant solution for d_* X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=0d4f7d91ba9c64ac6b5dd65fd758478bd338fe21;p=d2df-sdl.git net: a more elegant solution for d_* --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index b8c69a1..4f6f82a 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -774,6 +774,19 @@ end; function g_Game_IsNet(): Boolean; begin Result := (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]); + + if gGameSettings.GameType in [GT_SERVER, GT_CLIENT] then + begin + // set debug options to false to avoid cheaters + g_debug_Sounds := False; + g_debug_Frames := False; + g_debug_WinMsgs := False; + g_debug_MonsterOff := False; + g_debug_BotAIOff := 0; + g_debug_HealthBar := False; + g_Debug_Player := False; + Exit; + end; end; function g_Game_IsServer(): Boolean; @@ -4821,15 +4834,6 @@ begin // Óñòàíîâêà ðàçìåðîâ îêîí èãðîêîâ: g_Game_SetupScreenSize(); -// set debug options to false to avoid cheaters - g_debug_Sounds := False; - g_debug_Frames := False; - g_debug_WinMsgs := False; - g_debug_MonsterOff := False; - g_debug_BotAIOff := 0; - g_debug_HealthBar := False; - g_Debug_Player := False; - NetState := NET_STATE_AUTH; g_Game_SetLoadingText(_lc[I_LOAD_CONNECT], 0, False);