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.
This commit is contained in:
nethack.rankin
2005-10-11 03:47:27 +00:00
parent 8f8538e527
commit fb6cbd37e7
2 changed files with 7 additions and 2 deletions

View 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