Don't stop running next to a peaceful monster

... unless the monster blocks the way.
This commit is contained in:
Pasi Kallinen
2022-01-24 18:45:54 +02:00
parent 6d67f56eab
commit 6ed315ecf8
2 changed files with 3 additions and 2 deletions

View 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

View 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)