]> granicus.if.org Git - nethack/commitdiff
Don't stop running next to a peaceful monster
authorPasi Kallinen <paxed@alt.org>
Mon, 24 Jan 2022 16:45:54 +0000 (18:45 +0200)
committerPasi Kallinen <paxed@alt.org>
Mon, 24 Jan 2022 16:45:57 +0000 (18:45 +0200)
... unless the monster blocks the way.

doc/fixes37.0
src/hack.c

index b3c97c6d92b4c631a53a475ef04258043e398fb7..5dcb5a9b57bf006a702bfa968d71b78676f3f3ea 100644 (file)
@@ -759,6 +759,7 @@ when hitting with wet towel causes it to lose some wetness, defer "your towel
 do some extra damage when hitting an iron golem with a wet towel
 when already at level 30 and gaining another level--which doesn't increase
        level further but does add more HP and Pw--throttle the increases
+don't stop running when next to a peaceful, unless it blocks the way
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 05b04fe79a182799282a4ed791b077362c5f8431..a01821f5d7a0a67a1ff360631cfc1185643dfb31 100644 (file)
@@ -2947,9 +2947,9 @@ lookaround(void)
                 && M_AP_TYPE(mtmp) != M_AP_FURNITURE
                 && M_AP_TYPE(mtmp) != M_AP_OBJECT
                 && mon_visible(mtmp)) {
-                /* running movement and not a tame monster */
+                /* running movement and not a hostile monster */
                 /* OR it blocks our move direction and we're not traveling */
-                if ((g.context.run != 1 && !mtmp->mtame)
+                if ((g.context.run != 1 && !is_safemon(mtmp))
                     || (x == u.ux + u.dx && y == u.uy + u.dy
                         && !g.context.travel)) {
                     if (flags.mention_walls)