From: TerminalHash Date: Thu, 31 Aug 2023 22:08:31 +0000 (+0300) Subject: menu: added switch for team damage absorbtion X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=0afc0aed48395daa3f4f4845b12df146dc4f3ab3;p=d2df-sdl.git menu: added switch for team damage absorbtion --- diff --git a/src/game/g_language.pas b/src/game/g_language.pas index 341a457..22b589a 100644 --- a/src/game/g_language.pas +++ b/src/game/g_language.pas @@ -173,6 +173,7 @@ type I_MENU_DEATHMATCH_KEYS, I_MENU_ENABLE_EXITS, I_MENU_WEAPONS_STAY, + I_MENU_ENABLE_TEAM_DAMAGE_ABSOBR, I_MENU_ENABLE_MONSTERS, I_MENU_ENABLE_RULEZ_RANDOM, I_MENU_RULEZ_RESPAWN_MULTIPLIER, @@ -983,6 +984,8 @@ const 'Âêëþ÷èòü âûõîä:'), ('MENU WEAPONS STAY', 'Weapons stay:', 'Îðóæèå îñòà¸òñÿ:'), + ('MENU ENABLE TEAM DAMAGE ABSOBR', 'Enable team damage absorbtion:', + 'Ïîãëîùåíèå óðîíà ñîþçíèêàìè:'), ('MENU ENABLE MONSTERS', 'Enable monsters:', 'Ìîíñòðû:'), ('MENU ENABLE RULEZ RANDOM', 'Enable random powerup respawn:', diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 39da020..8da0b63 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -743,6 +743,8 @@ begin gsGameFlags := 0; if TGUISwitch(GetControl('swTeamDamage')).ItemIndex = 0 then gsGameFlags := gsGameFlags or GAME_OPTION_TEAMDAMAGE; + if TGUISwitch(GetControl('swTeamAbsorbDamage')).ItemIndex = 0 then + gsGameFlags := gsGameFlags or GAME_OPTION_TEAMABSORBDAMAGE; if TGUISwitch(GetControl('swDeathmatchKeys')).ItemIndex = 0 then gsGameFlags := gsGameFlags or GAME_OPTION_DMKEYS; if TGUISwitch(GetControl('swEnableExits')).ItemIndex = 0 then @@ -2372,6 +2374,16 @@ begin else ItemIndex := 3; end; + with AddSwitch(_lc[I_MENU_ENABLE_TEAM_DAMAGE_ABSOBR]) do + begin + Name := 'swTeamAbsorbDamage'; + AddItem(_lc[I_MENU_YES]); + AddItem(_lc[I_MENU_NO]); + if LongBool(gsGameFlags and GAME_OPTION_TEAMABSORBDAMAGE) then + ItemIndex := 0 + else + ItemIndex := 1; + end; with AddSwitch(_lc[I_MENU_DEATHMATCH_KEYS]) do begin Name := 'swDeathmatchKeys'; @@ -2639,6 +2651,16 @@ begin else ItemIndex := 3; end; + with AddSwitch(_lc[I_MENU_ENABLE_TEAM_DAMAGE_ABSOBR]) do + begin + Name := 'swTeamAbsorbDamage'; + AddItem(_lc[I_MENU_YES]); + AddItem(_lc[I_MENU_NO]); + if LongBool(gsGameFlags and GAME_OPTION_TEAMABSORBDAMAGE) then + ItemIndex := 0 + else + ItemIndex := 1; + end; with AddSwitch(_lc[I_MENU_DEATHMATCH_KEYS]) do begin Name := 'swDeathmatchKeys';