From ccffc8481521ff8cbeb57c76c0387c10d806182e Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Fri, 1 Sep 2017 08:10:50 +0300 Subject: [PATCH] do not turn off mosters in DM games (Jah request) --- src/game/g_menu.pas | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 5371f41..60750aa 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -506,20 +506,34 @@ end; procedure ProcSwitchMonstersCustom(Sender: TGUIControl); begin + // don't turn off monsters in DM with TGUIMenu(g_ActiveWindow.GetControl('mCustomGameMenu')) do - if TGUISwitch(GetControl('swGameMode')).GetText = _lc[I_MENU_GAME_TYPE_COOP] then + if TGUISwitch(GetControl('swGameMode')).GetText <> _lc[I_MENU_GAME_TYPE_CTF] then TGUISwitch(GetControl('swMonsters')).ItemIndex := 0 else TGUISwitch(GetControl('swMonsters')).ItemIndex := 1; + { + if TGUISwitch(GetControl('swGameMode')).GetText = _lc[I_MENU_GAME_TYPE_COOP] then + TGUISwitch(GetControl('swMonsters')).ItemIndex := 0 + else if TGUISwitch(GetControl('swGameMode')).GetText = _lc[I_MENU_GAME_TYPE_CTF] then + TGUISwitch(GetControl('swMonsters')).ItemIndex := 1; + } end; procedure ProcSwitchMonstersNet(Sender: TGUIControl); begin + // don't turn off monsters in DM with TGUIMenu(g_ActiveWindow.GetControl('mNetServerMenu')) do - if TGUISwitch(GetControl('swGameMode')).GetText = _lc[I_MENU_GAME_TYPE_COOP] then + if TGUISwitch(GetControl('swGameMode')).GetText <> _lc[I_MENU_GAME_TYPE_CTF] then TGUISwitch(GetControl('swMonsters')).ItemIndex := 0 else TGUISwitch(GetControl('swMonsters')).ItemIndex := 1; + { + if TGUISwitch(GetControl('swGameMode')).GetText = _lc[I_MENU_GAME_TYPE_COOP] then + TGUISwitch(GetControl('swMonsters')).ItemIndex := 0 + else if TGUISwitch(GetControl('swGameMode')).GetText = _lc[I_MENU_GAME_TYPE_CTF] then + TGUISwitch(GetControl('swMonsters')).ItemIndex := 1; + } end; procedure ProcStartCustomGame(); -- 2.29.2