From: cohrs Date: Wed, 26 May 2004 15:49:49 +0000 (+0000) Subject: monsters using teleport traps X-Git-Tag: MOVE2GIT~1463 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71ffb22812d5342240b57e89f67fb26a61ded3dc;p=nethack 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 ||. --- diff --git a/src/muse.c b/src/muse.c index 06b1476b0..ee39e5402 100644 --- a/src/muse.c +++ b/src/muse.c @@ -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)