]> granicus.if.org Git - nethack/commitdiff
monsters using teleport traps
authorcohrs <cohrs>
Wed, 26 May 2004 15:49:49 +0000 (15:49 +0000)
committercohrs <cohrs>
Wed, 26 May 2004 15:49:49 +0000 (15:49 +0000)
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 ||.

src/muse.c

index 06b1476b0ba3ad01c87ed7d2acead90c49d22008..ee39e5402456b7c7783d5d2b24fe1d87a0924cd9 100644 (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)