From: Ketmar Dark Date: Wed, 13 Sep 2017 04:13:16 +0000 (+0300) Subject: cheats are active in single/coop now ('cause Wyoming Knotts, you know) X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=commitdiff_plain;h=02e6aa22f21119c1a329e7b5321b94bf9fe9d4d7 cheats are active in single/coop now ('cause Wyoming Knotts, you know) --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index d98227a..f4882b6 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -360,9 +360,9 @@ begin if g_Game_IsNet then exit; if not gDebugMode then begin - if not gCheats then exit; + //if not gCheats then exit; if not (gGameSettings.GameType in [GT_SINGLE, GT_CUSTOM]) then exit; - if (gGameSettings.GameMode <> GM_COOP) then exit; + if not (gGameSettings.GameMode in [GM_COOP, GM_SINGLE]) then exit; end; result := true; end; @@ -5205,7 +5205,7 @@ var mon: TMonster; begin // Êîìàíäû îòëàäî÷íîãî ðåæèìà: - if gDebugMode then + if {gDebugMode}conIsCheatsEnabled then begin cmd := LowerCase(P[0]); if cmd = 'd_window' then @@ -5339,8 +5339,7 @@ var f, a: Integer; plr: TPlayer; begin - if (not gGameOn) or (not gCheats) or ((gGameSettings.GameType <> GT_SINGLE) and - (gGameSettings.GameMode <> GM_COOP) and (not gDebugMode)) or g_Game_IsNet then + if (not gGameOn) or (not conIsCheatsEnabled) then begin g_Console_Add('not available'); exit; diff --git a/src/game/g_main.pas b/src/game/g_main.pas index af83d89..feb5980 100644 --- a/src/game/g_main.pas +++ b/src/game/g_main.pas @@ -253,9 +253,13 @@ var c: ShortString; a: Integer; begin + { if (not gGameOn) or (not gCheats) or ((gGameSettings.GameType <> GT_SINGLE) and (gGameSettings.GameMode <> GM_COOP) and (not gDebugMode)) or g_Game_IsNet then Exit; + } + if not gGameOn then exit; + if not conIsCheatsEnabled then exit; s := 'SOUND_GAME_RADIO'; diff --git a/src/game/g_player.pas b/src/game/g_player.pas index e6e0d36..4b0bffc 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -3661,7 +3661,7 @@ function TPlayer.PickItem(ItemType: Byte; arespawn: Boolean; var remove: Boolean if (FBFGFireCounter <> -1) then begin result := false; exit; end; result := true; if gBerserkAutoswitch then exit; - if not (gDebugMode or gCheats) then exit; + if not conIsCheatsEnabled then exit; result := false; end;