]> granicus.if.org Git - nethack/commitdiff
fix #H7585 - can't untrap from edge of pit
authorPatR <rankin@nethack.org>
Thu, 22 Nov 2018 03:16:23 +0000 (19:16 -0800)
committerPatR <rankin@nethack.org>
Thu, 22 Nov 2018 03:16:23 +0000 (19:16 -0800)
Attempting to untrap an adjacent location failed if you had escaped a
pit, claiming that you couldn't reach.  You can't reach the bottom of
the pit if you're not in it, but you should be able to reach adjacent
spots normally.

doc/fixes36.2
src/trap.c

index 3f6bc996f92c2d9aa0a647be67616fe568e4afc7..2ad652f368ce80010e3930b377245fe661da0bd4 100644 (file)
@@ -207,6 +207,8 @@ if a migrating monster was killed off because there was no room on the
        which should never leave one (demon, golem, blob, &c)
 end of game while carrying Schroedinger's Box would reveal cat-or-corpse
        for inventory disclosure or put that info into dumplog, but not both
+attempting to untrap an adjacent trap while on the edge of--not in--a pit
+       failed due to not being able to reach the floor
 
 
 Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
index da7e01625296b8b2ae13b924dd6a8c894f8b382a..330fa73e27a6bd610a71c9d7c1fd4e97a6755f13 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 trap.c  $NHDT-Date: 1542765365 2018/11/21 01:56:05 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.303 $ */
+/* NetHack 3.6 trap.c  $NHDT-Date: 1542856572 2018/11/22 03:16:12 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.304 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2013. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -4038,7 +4038,7 @@ boolean force_failure;
         }
     }
     /* untrappable traps are located on the ground. */
-    if (!can_reach_floor(TRUE)) {
+    if (!can_reach_floor(under_u)) {
         if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
             rider_cant_reach();
         else