diff --git a/src/do.c b/src/do.c index f4415b251..580c701c0 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 do.c $NHDT-Date: 1596498158 2020/08/03 23:42:38 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.247 $ */ +/* NetHack 3.7 do.c $NHDT-Date: 1598575088 2020/08/28 00:38:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.248 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1944,7 +1944,7 @@ long timeout UNUSED; /* corpse will revive somewhere else if there is a monster in the way; Riders get a chance to try to bump the obstacle out of their way */ - if ((mptr->mflags3 & M3_DISPLACES) != 0 && body->where == OBJ_FLOOR + if (is_displacer(mptr) && body->where == OBJ_FLOOR && get_obj_location(body, &x, &y, 0) && (mtmp = m_at(x, y)) != 0) { boolean notice_it = canseemon(mtmp); /* before rloc() */ char *monname = Monnam(mtmp); diff --git a/src/mon.c b/src/mon.c index 2a81379e7..a4c0f6f90 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mon.c $NHDT-Date: 1596498185 2020/08/03 23:43:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.343 $ */ +/* NetHack 3.7 mon.c $NHDT-Date: 1598575089 2020/08/28 00:38:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.344 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1742,8 +1742,7 @@ struct monst *magr, /* monster that is currently deciding where to move */ as high as the attacker, don't let attacker do so, otherwise they might just end up swapping places again when defender gets its chance to move */ - if ((pa->mflags3 & M3_DISPLACES) != 0 - && ((pd->mflags3 & M3_DISPLACES) == 0 || magr->m_lev > mdef->m_lev) + if (is_displacer(pa) && (!is_displacer(pd) || magr->m_lev > mdef->m_lev) /* no displacing grid bugs diagonally */ && !(magr->mx != mdef->mx && magr->my != mdef->my && NODIAG(monsndx(pd)))