Wall of water should block monster lined-up checks
Prevents monsters from eg. throwing items through the water.
This commit is contained in:
+4
-2
@@ -1037,7 +1037,8 @@ linedup_callback(
|
|||||||
bx += dx, by += dy;
|
bx += dx, by += dy;
|
||||||
if (!isok(bx, by))
|
if (!isok(bx, by))
|
||||||
return FALSE;
|
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;
|
return FALSE;
|
||||||
if ((*fnc)(bx, by))
|
if ((*fnc)(bx, by))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -1080,7 +1081,8 @@ linedup(
|
|||||||
do {
|
do {
|
||||||
/* <bx,by> is guaranteed to eventually converge with <ax,ay> */
|
/* <bx,by> is guaranteed to eventually converge with <ax,ay> */
|
||||||
bx += dx, by += dy;
|
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;
|
return FALSE;
|
||||||
if (sobj_at(BOULDER, bx, by))
|
if (sobj_at(BOULDER, bx, by))
|
||||||
++boulderspots;
|
++boulderspots;
|
||||||
|
|||||||
Reference in New Issue
Block a user