From: PatR Date: Thu, 14 Jul 2022 23:29:08 +0000 (-0700) Subject: wizmgender fix X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32636099ce411b39cd6cbfaf161c1ab6feaf7289;p=nethack wizmgender fix The 'wizmgender' option is flagged as 'wizonly' in optlist.h but that doesn't prevent it from being set in NETHACKOPTIONS or .nethackrc. Apply the fix from entrez to only honor it when running in wizard mode. --- diff --git a/src/objnam.c b/src/objnam.c index 96a6e04ef..fba567353 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1340,7 +1340,7 @@ doname_base( } if ((obj->otyp == STATUE || obj->otyp == CORPSE || obj->otyp == FIGURINE) - && iflags.wizmgender) { + && wizard && iflags.wizmgender) { int cgend = (obj->spe & CORPSTAT_GENDER), mgend = ((cgend == CORPSTAT_MALE) ? MALE : (cgend == CORPSTAT_FEMALE) ? FEMALE diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 4bf0fe13c..ea33ef2d4 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -813,7 +813,7 @@ curses_print_glyph( attr = A_REVERSE; } /* highlight female monsters (wizard mode option) */ - if ((special & MG_FEMALE) && iflags.wizmgender) { + if ((special & MG_FEMALE) && wizard && iflags.wizmgender) { attr = A_REVERSE; } } diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 794236ea5..82b7b8cbd 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -4257,7 +4257,7 @@ tty_print_glyph( to see although the Valkyrie quest ends up being hard on the eyes) */ if (((special & MG_PET) != 0 && iflags.hilite_pet) || ((special & MG_OBJPILE) != 0 && iflags.hilite_pile) - || ((special & MG_FEMALE) != 0 && iflags.wizmgender) + || ((special & MG_FEMALE) != 0 && wizard && iflags.wizmgender) || ((special & (MG_DETECT | MG_BW_LAVA | MG_BW_ICE)) != 0 && iflags.use_inverse)) { term_start_attr(ATR_INVERSE);