Fix traps generated inside walls
When fuzzing, noticed a trap generated inside a wall. Culprit was one of the themed rooms that generates a rectangular room and then puts freestanding wall columns inside. Note in somexy that it can return a non-accessible location, and change the places that used it and absolutely needed a space to somexyspace.
This commit is contained in:
+2
-2
@@ -500,7 +500,7 @@ vault_tele(void)
|
||||
register struct mkroom *croom = search_special(VAULT);
|
||||
coord c;
|
||||
|
||||
if (croom && somexy(croom, &c) && teleok(c.x, c.y, FALSE)) {
|
||||
if (croom && somexyspace(croom, &c) && teleok(c.x, c.y, FALSE)) {
|
||||
teleds(c.x, c.y, TELEDS_TELEPORT);
|
||||
return;
|
||||
}
|
||||
@@ -1465,7 +1465,7 @@ mvault_tele(struct monst* mtmp)
|
||||
struct mkroom *croom = search_special(VAULT);
|
||||
coord c;
|
||||
|
||||
if (croom && somexy(croom, &c) && goodpos(c.x, c.y, mtmp, 0)) {
|
||||
if (croom && somexyspace(croom, &c) && goodpos(c.x, c.y, mtmp, 0)) {
|
||||
rloc_to(mtmp, c.x, c.y);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user