Audit rloc()
Most of the time, rloc() is used for teleporting monsters and it's not a big deal if they can't find somewhere to go. In a few cases, it is. I went through all the callsites and made calls to rloc() not cause impossible()s if they don't need to. Fixes a bug/suite of bugs reported by ais523.
This commit is contained in:
@@ -326,7 +326,7 @@ register struct monst *mtmp;
|
||||
if (In_W_tower(mtmp->mx, mtmp->my, &u.uz)
|
||||
|| (mtmp->iswiz && !xupstair && !mon_has_amulet(mtmp))) {
|
||||
if (!rn2(3 + mtmp->mhp / 10))
|
||||
(void) rloc(mtmp, FALSE);
|
||||
(void) rloc(mtmp, TRUE);
|
||||
} else if (xupstair
|
||||
&& (mtmp->mx != xupstair || mtmp->my != yupstair)) {
|
||||
(void) mnearto(mtmp, xupstair, yupstair, TRUE);
|
||||
|
||||
Reference in New Issue
Block a user