Fix priest generated inside temple wall

In a rare case, a random room's width can be 2 tiles, and if
that room was converted into a temple, the priest ended up
inside the wall. Try to put the priest on a random valid position
around the altar, or on it.
This commit is contained in:
Pasi Kallinen
2020-03-12 19:13:08 +02:00
parent a6c600fd61
commit 2ff8523481
4 changed files with 24 additions and 4 deletions

View File

@@ -1084,6 +1084,14 @@ register int humidity;
return FALSE;
}
boolean
pm_good_location(x, y, pm)
int x, y;
struct permonst *pm;
{
return is_ok_location(x, y, pm_to_humidity(pm));
}
static unpacked_coord
get_unpacked_coord(loc, defhumidity)
long loc;