]> granicus.if.org Git - nethack/commitdiff
condtests[bl_bareh] requires a couple of additional g.context.botl = 1
authornhmall <nhmall@nethack.org>
Sat, 8 Feb 2020 16:03:46 +0000 (11:03 -0500)
committernhmall <nhmall@nethack.org>
Sat, 8 Feb 2020 16:03:46 +0000 (11:03 -0500)
doc/fixes37.0
src/do_wear.c
src/wield.c

index 4454b3eeef97ba64a304ec5310ee0ecbb0a3f16d..09d6858eafd6f3d15e94f361fa1b5cb7e433e394 100644 (file)
@@ -87,6 +87,8 @@ creating Mine Town variant 1 (Orcish Town) sometimes complained about being
 prevent "you materialize on a different level" after "a mysterious force
        prevents you from descending" if you try to level teleport past the
        stairs down from the quest home level before being granted access
+set g.context.botl for glove and wielding actions that could start or end
+       bare-handedness in support of condtests[bl_bareh]
 
 
 Platform- and/or Interface-Specific Fixes
index 663cb6947a2cc338e62016fb8acad86c727ad60c..8822948184d72d2033fe49cbc767ec00b35d198e 100644 (file)
@@ -593,6 +593,8 @@ Gloves_off(VOID_ARGS)
        engage if a corpse has been set up as the alternate weapon.] */
     if (u.twoweap && uswapwep && uswapwep->otyp == CORPSE)
         wielding_corpse(uswapwep, on_purpose);
+    if (condtests[bl_bareh].enabled)
+        g.context.botl = 1;
 
     return 0;
 }
index c99ee9c7b46b7aedcab84d8e91c3f0fdaf54f1cc..6e58f682fb829a587fd038bf6125f5d502768eee 100644 (file)
@@ -139,6 +139,7 @@ struct obj *wep;
 {
     /* Separated function so swapping works easily */
     int res = 0;
+    boolean had_wep = (uwep != 0);
 
     if (!wep) {
         /* No weapon */
@@ -221,6 +222,8 @@ struct obj *wep;
             }
         }
     }
+    if ((had_wep != (uwep != 0)) && condtests[bl_bareh].enabled)
+        g.context.botl = 1;
     return res;
 }