From: PatR Date: Fri, 12 Apr 2019 08:33:42 +0000 (-0700) Subject: fix #H8534 - thrown pick-axe vs "scum!" X-Git-Tag: NetHack-3.6.2_Released~19^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa98c6fb72bcc53dc45e2b3d72e84e3e261a5f65;p=nethack fix #H8534 - thrown pick-axe vs "scum!" [I accidentally left this out of the earlier patch.] Change in meaning of mnearto()'s return value wasn't progagated to shkcatch(). Make it an int instead of boolean so that it can communicate both 'moved successfully' and 'moved but had to move another monster out of the way to do so'. --- diff --git a/src/shk.c b/src/shk.c index ef5bc0206..649a84521 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 shk.c $NHDT-Date: 1551738135 2019/03/04 22:22:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.157 $ */ +/* NetHack 3.6 shk.c $NHDT-Date: 1555058014 2019/04/12 08:33:34 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.158 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3397,7 +3397,7 @@ register xchar x, y; && dist2(shkp->mx, shkp->my, x, y) < 3 /* if it is the shk's pos, you hit and anger him */ && (shkp->mx != x || shkp->my != y)) { - if (mnearto(shkp, x, y, TRUE) && !Deaf && !muteshk(shkp)) + if (mnearto(shkp, x, y, TRUE) == 2 && !Deaf && !muteshk(shkp)) verbalize("Out of my way, scum!"); if (cansee(x, y)) { pline("%s nimbly%s catches %s.", Shknam(shkp),