Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
consider translucency and comp_translucency settings on all complevels
Browse files Browse the repository at this point in the history
This changes the code to evaluate the user-set
`default_comp[comp_translucency]` value instead of the
`comp[comp_translucency]` value which is computed based on current
complevel.

This allows for translucent sprites on all complevels (fixes #246) and
at the same time allows for disabling predefined translucency on all
complevels (fixes #248). Additionally, the change of the compatibility
option is instantly applied to the current game.
  • Loading branch information
fabiangreffrath committed Mar 26, 2021
1 parent 6d06b1b commit 393bf40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prboom2/src/d_deh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ void deh_changeCompTranslucency(void)
}
else
#endif
if (comp[comp_translucency])
if (default_comp[comp_translucency])
mobjinfo[predefined_translucency[i]].flags &= ~MF_TRANSLUCENT;
else
mobjinfo[predefined_translucency[i]].flags |= MF_TRANSLUCENT;
Expand Down
2 changes: 1 addition & 1 deletion prboom2/src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3686,7 +3686,7 @@ setup_menu_t comp_settings3[] = // Compatibility Settings screen #3
{"Max Health in DEH applies only to potions", S_YESNO, m_null, C_X,
C_Y + compat_maxhealth * COMP_SPC, {"comp_maxhealth"}},
{"No predefined translucency for some things", S_YESNO, m_null, C_X,
C_Y + compat_translucency * COMP_SPC, {"comp_translucency"}},
C_Y + compat_translucency * COMP_SPC, {"comp_translucency"},0,0,deh_changeCompTranslucency},
// [FG]
{"allow MBF sky transfers in all complevels", S_YESNO, m_null, C_X,
C_Y + compat_skytransfers * COMP_SPC, {"comp_skytransfers"}},
Expand Down

0 comments on commit 393bf40

Please sign in to comment.