Wall of water should block monster lined-up checks

Prevents monsters from eg. throwing items through the water.
This commit is contained in:
Pasi Kallinen
2022-02-13 17:21:57 +02:00
parent 6005717e6d
commit 2448ead0c4

View File

@@ -1037,7 +1037,8 @@ linedup_callback(
bx += dx, by += dy;
if (!isok(bx, by))
return FALSE;
if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by))
if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by)
|| levl[bx][by].typ == WATER)
return FALSE;
if ((*fnc)(bx, by))
return TRUE;
@@ -1080,7 +1081,8 @@ linedup(
do {
/* <bx,by> is guaranteed to eventually converge with <ax,ay> */
bx += dx, by += dy;
if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by))
if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by)
|| levl[bx][by].typ == WATER)
return FALSE;
if (sobj_at(BOULDER, bx, by))
++boulderspots;