Use u_at macro

This commit is contained in:
Pasi Kallinen
2022-02-23 20:28:35 +02:00
parent 2635c60280
commit 8e91320d2f
40 changed files with 126 additions and 130 deletions

View File

@@ -125,7 +125,7 @@ gush(int x, int y, genericptr_t poolcnt)
register struct monst *mtmp;
register struct trap *ttmp;
if (((x + y) % 2) || (x == u.ux && y == u.uy)
if (((x + y) % 2) || u_at(x, y)
|| (rn2(1 + distmin(u.ux, u.uy, x, y))) || (levl[x][y].typ != ROOM)
|| (sobj_at(BOULDER, x, y)) || nexttodoor(x, y))
return;
@@ -519,7 +519,7 @@ dipfountain(register struct obj *obj)
void
breaksink(int x, int y)
{
if (cansee(x, y) || (x == u.ux && y == u.uy))
if (cansee(x, y) || u_at(x, y))
pline_The("pipes break! Water spurts out!");
g.level.flags.nsinks--;
levl[x][y].typ = FOUNTAIN, levl[x][y].looted = 0;