From 7d38435a9b388cf5aa51c20bf6c3ca380ec8206b Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 2 Jun 2019 10:34:38 -0400 Subject: [PATCH] don't clear mtmp->mx, mtmp->my even when obliterating --- src/mon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mon.c b/src/mon.c index 690b67b7c..ac29cf866 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1847,10 +1847,9 @@ struct permonst *mptr; /* reflects mtmp->data _prior_ to mtmp's death */ shkgone(mtmp); if (mtmp->wormno) wormgone(mtmp); - if (In_endgame(&u.uz)) { - mtmp->mx = mtmp->my = 0; + if (In_endgame(&u.uz)) mtmp->mstate |= MON_ENDGAME_FREE; - } + mtmp->mstate |= MON_DETACH; iflags.purge_monsters++; } @@ -2681,8 +2680,9 @@ struct monst *mon; mtmp->mstate |= MON_OBLITERATE; mongone(mtmp); - mtmp->mx = mtmp->my = 0; - rloc_to(mon, mx, my); + /* some places in the code might still reference mtmp->mx, mtmp->my */ + /* mtmp->mx = mtmp->my = 0; */ + rloc_to(mon, mx, my); /* note: mon, not mtmp */ } else { /* last resort - migrate mon to the next plane */ if (Is_waterlevel(&u.uz) || Is_firelevel(&u.uz) || Is_earthlevel(&u.uz)) {