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

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