]> granicus.if.org Git - nethack/commitdiff
fix C343-3 / #U793, tame h and U don't dig on Rogue level
authornethack.rankin <nethack.rankin>
Tue, 11 Oct 2005 03:47:27 +0000 (03:47 +0000)
committernethack.rankin <nethack.rankin>
Tue, 11 Oct 2005 03:47:27 +0000 (03:47 +0000)
     From a bug report, 2003:  a
pet who normally would dig could pass through walls and solid rock on the
Rogue level without leaving a tunnel in its wake.  Monsters are explicitly
prohibited from digging on the Rogue level, but pet movement ignored that
and specified that locations accessible via digging were valid destinations;
actual movement bypassed the digging step so it acted like passthru.

doc/fixes34.4
src/dogmove.c

index ec6d9195f64594f55d0ad8f9327fdec1f258cb3c..a7d53d69b6cac0e016da8b056ef0252eb482d80b 100644 (file)
@@ -150,6 +150,7 @@ fix grammar when choking on gold
 some messages which referred to "mirror" ought to have used "looking glass"
 incubi react to mirrors
 alignment of Angels was handled inconsistently
+pets capable of digging could pass through walls and stone on the Rogue level
 
 
 Platform- and/or Interface-Specific Fixes
index a9f6119b42fbc570b831dca051e87adcb5a7988e..7779e5c027d109d1620b5af06aaeb8a26343fbf4 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)dogmove.c  3.5     2005/06/22      */
+/*     SCCS Id: @(#)dogmove.c  3.5     2005/10/10      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -592,7 +592,11 @@ register int after;        /* this is extra fast monster movement */
                if (m_carrying(mtmp, SKELETON_KEY)) allowflags |= BUSTDOOR;
        }
        if (is_giant(mtmp->data)) allowflags |= BUSTDOOR;
-       if (tunnels(mtmp->data)) allowflags |= ALLOW_DIG;
+       if (tunnels(mtmp->data)
+#ifdef REINCARNATION
+           && !Is_rogue_level(&u.uz)   /* same restriction as m_move() */
+#endif
+           ) allowflags |= ALLOW_DIG;
        cnt = mfndpos(mtmp, poss, info, allowflags);
 
        /* Normally dogs don't step on cursed items, but if they have no