From: nethack.rankin Date: Tue, 11 Oct 2005 03:47:27 +0000 (+0000) Subject: fix C343-3 / #U793, tame h and U don't dig on Rogue level X-Git-Tag: MOVE2GIT~1224 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb6cbd37e7e73aa744a7eb73d533d34d9bd64036;p=nethack fix C343-3 / #U793, tame h and U don't dig on Rogue level 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. --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index ec6d9195f..a7d53d69b 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/src/dogmove.c b/src/dogmove.c index a9f6119b4..7779e5c02 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -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