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:
@@ -646,7 +646,7 @@ struct monst *mtmp;
|
||||
}
|
||||
if (oseen && how)
|
||||
makeknown(how);
|
||||
(void) rloc(mtmp, FALSE);
|
||||
(void) rloc(mtmp, TRUE);
|
||||
return 2;
|
||||
case MUSE_WAN_TELEPORTATION:
|
||||
zap_oseen = oseen;
|
||||
@@ -1238,7 +1238,7 @@ register struct obj *otmp;
|
||||
if (cansee(mtmp->mx, mtmp->my))
|
||||
pline("%s resists the magic!", Monnam(mtmp));
|
||||
} else if (!tele_restrict(mtmp))
|
||||
(void) rloc(mtmp, FALSE);
|
||||
(void) rloc(mtmp, TRUE);
|
||||
}
|
||||
break;
|
||||
case WAN_CANCELLATION:
|
||||
|
||||
Reference in New Issue
Block a user