diff --git a/doc/fixes34.4 b/doc/fixes34.4 index bb2d3e127..104cfe351 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -92,6 +92,7 @@ monkeys can't steal rings worn under cursed weapon succubi will remove hero's gloves before taking worn ring; incubi will do so before forcing ring to be put on mbodypart should return forehoof, not foreclaw, for horselike monsters +further digging of an existing hole finishes in a single turn Platform- and/or Interface-Specific Fixes diff --git a/src/dig.c b/src/dig.c index 407c77fb6..0608d0998 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)dig.c 3.5 2003/03/23 */ +/* SCCS Id: @(#)dig.c 3.5 2005/03/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -270,9 +270,10 @@ dig() if (Race_if(PM_DWARF)) context.digging.effort *= 2; if (context.digging.down) { - register struct trap *ttmp; + struct trap *ttmp = t_at(dpx, dpy); - if (context.digging.effort > 250) { + if (context.digging.effort > 250 || + (ttmp && ttmp->ttyp == HOLE)) { (void) dighole(FALSE); (void) memset((genericptr_t)&context.digging, 0, sizeof (struct dig_info)); @@ -280,9 +281,8 @@ dig() } if (context.digging.effort <= 50 || - ((ttmp = t_at(dpx,dpy)) != 0 && - (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT || - ttmp->ttyp == TRAPDOOR || ttmp->ttyp == HOLE))) + (ttmp && (ttmp->ttyp == TRAPDOOR || + ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT))) return(1); if (IS_ALTAR(lev->typ)) {