monsters using teleport traps

While trying in vain to find code that would cause the reported
priest-on-players-location behavior, I did find that the code to find
a usable teleport or similar trap was disallowing lots of locations due to
an && that should have been an ||.
This commit is contained in:
cohrs
2004-05-26 15:49:49 +00:00
parent 1616f26ce8
commit 71ffb22812

View File

@@ -368,7 +368,7 @@ struct monst *mtmp;
for(xx = x-1; xx <= x+1; xx++) for(yy = y-1; yy <= y+1; yy++)
if (isok(xx,yy))
if (xx != u.ux && yy != u.uy)
if (xx != u.ux || yy != u.uy)
if (mtmp->data != &mons[PM_GRID_BUG] || xx == x || yy == y)
if ((xx==x && yy==y) || !level.monsters[xx][yy])
if ((t = t_at(xx,yy)) != 0)