]> granicus.if.org Git - nethack/commitdiff
wizmgender fix
authorPatR <rankin@nethack.org>
Thu, 14 Jul 2022 23:29:08 +0000 (16:29 -0700)
committerPatR <rankin@nethack.org>
Thu, 14 Jul 2022 23:29:08 +0000 (16:29 -0700)
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.

src/objnam.c
win/curses/cursmain.c
win/tty/wintty.c

index 96a6e04efaed07d2148feda25423ce5939acdd4a..fba567353357fb8c2a6b763ae13ebcbe299e02df 100644 (file)
@@ -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
index 4bf0fe13c87055a35bb10a2602dccf6a1614ba40..ea33ef2d4a50b3e492135f43fcfc0e8a443d5a7c 100644 (file)
@@ -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;
         }
     }
index 794236ea5c1d1d84d3426e25f685085e74043090..82b7b8cbd9a8a9f7a19adeb2e18a519ad332e88b 100644 (file)
@@ -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);