don't clear mtmp->mx, mtmp->my even when obliterating

This commit is contained in:
nhmall
2019-06-02 10:34:38 -04:00
parent 5c30cc5890
commit 7d38435a9b
+5 -5
View File
@@ -1847,10 +1847,9 @@ struct permonst *mptr; /* reflects mtmp->data _prior_ to mtmp's death */
shkgone(mtmp); shkgone(mtmp);
if (mtmp->wormno) if (mtmp->wormno)
wormgone(mtmp); wormgone(mtmp);
if (In_endgame(&u.uz)) { if (In_endgame(&u.uz))
mtmp->mx = mtmp->my = 0;
mtmp->mstate |= MON_ENDGAME_FREE; mtmp->mstate |= MON_ENDGAME_FREE;
}
mtmp->mstate |= MON_DETACH; mtmp->mstate |= MON_DETACH;
iflags.purge_monsters++; iflags.purge_monsters++;
} }
@@ -2681,8 +2680,9 @@ struct monst *mon;
mtmp->mstate |= MON_OBLITERATE; mtmp->mstate |= MON_OBLITERATE;
mongone(mtmp); mongone(mtmp);
mtmp->mx = mtmp->my = 0; /* some places in the code might still reference mtmp->mx, mtmp->my */
rloc_to(mon, mx, my); /* mtmp->mx = mtmp->my = 0; */
rloc_to(mon, mx, my); /* note: mon, not mtmp */
} else { } else {
/* last resort - migrate mon to the next plane */ /* last resort - migrate mon to the next plane */
if (Is_waterlevel(&u.uz) || Is_firelevel(&u.uz) || Is_earthlevel(&u.uz)) { if (Is_waterlevel(&u.uz) || Is_firelevel(&u.uz) || Is_earthlevel(&u.uz)) {