if (flg & (PROJECT_DISI))
{
- if ((n > 0) && cave_stop_disintegration(y, x)) break;
+ if ((n > 0) && cave_stop_disintegration(floor_ptr, y, x)) break;
}
else if (flg & (PROJECT_LOS))
{
if (flg & (PROJECT_DISI))
{
- if ((n > 0) && cave_stop_disintegration(y, x)) break;
+ if ((n > 0) && cave_stop_disintegration(floor_ptr, y, x)) break;
}
else if (flg & (PROJECT_LOS))
{
if (flg & (PROJECT_DISI))
{
- if ((n > 0) && cave_stop_disintegration(y, x)) break;
+ if ((n > 0) && cave_stop_disintegration(floor_ptr, y, x)) break;
}
else if (flg & (PROJECT_LOS))
{
/*
* Does the grid stop disintegration?
*/
-#define cave_stop_disintegration(Y,X) \
- (!cave_have_flag_bold(p_ptr->current_floor_ptr, (Y), (X), FF_PROJECT) && \
- (!cave_have_flag_bold(p_ptr->current_floor_ptr, (Y), (X), FF_HURT_DISI) || \
- cave_have_flag_bold(p_ptr->current_floor_ptr, (Y), (X), FF_PERMANENT)))
+#define cave_stop_disintegration(F,Y,X) \
+ (!cave_have_flag_bold((F), (Y), (X), FF_PROJECT) && \
+ (!cave_have_flag_bold((F), (Y), (X), FF_HURT_DISI) || \
+ cave_have_flag_bold((F), (Y), (X), FF_PERMANENT)))
/*
{
for (ty = y1 + 1; ty < y2; ty++)
{
- if (cave_stop_disintegration(ty, x1)) return (FALSE);
+ if (cave_stop_disintegration(p_ptr->current_floor_ptr, ty, x1)) return (FALSE);
}
}
{
for (ty = y1 - 1; ty > y2; ty--)
{
- if (cave_stop_disintegration(ty, x1)) return (FALSE);
+ if (cave_stop_disintegration(p_ptr->current_floor_ptr, ty, x1)) return (FALSE);
}
}
{
for (tx = x1 + 1; tx < x2; tx++)
{
- if (cave_stop_disintegration(y1, tx)) return (FALSE);
+ if (cave_stop_disintegration(p_ptr->current_floor_ptr, y1, tx)) return (FALSE);
}
}
{
for (tx = x1 - 1; tx > x2; tx--)
{
- if (cave_stop_disintegration(y1, tx)) return (FALSE);
+ if (cave_stop_disintegration(p_ptr->current_floor_ptr, y1, tx)) return (FALSE);
}
}
{
if (ay == 2)
{
- if (!cave_stop_disintegration(y1 + sy, x1)) return (TRUE);
+ if (!cave_stop_disintegration(p_ptr->current_floor_ptr, y1 + sy, x1)) return (TRUE);
}
}
{
if (ax == 2)
{
- if (!cave_stop_disintegration(y1, x1 + sx)) return (TRUE);
+ if (!cave_stop_disintegration(p_ptr->current_floor_ptr, y1, x1 + sx)) return (TRUE);
}
}
/* the LOS exactly meets the corner of a tile. */
while (x2 - tx)
{
- if (cave_stop_disintegration(ty, tx)) return (FALSE);
+ if (cave_stop_disintegration(p_ptr->current_floor_ptr, ty, tx)) return (FALSE);
qy += m;
else if (qy > f2)
{
ty += sy;
- if (cave_stop_disintegration(ty, tx)) return (FALSE);
+ if (cave_stop_disintegration(p_ptr->current_floor_ptr, ty, tx)) return (FALSE);
qy -= f1;
tx += sx;
}
/* the LOS exactly meets the corner of a tile. */
while (y2 - ty)
{
- if (cave_stop_disintegration(ty, tx)) return (FALSE);
+ if (cave_stop_disintegration(p_ptr->current_floor_ptr, ty, tx)) return (FALSE);
qx += m;
else if (qx > f2)
{
tx += sx;
- if (cave_stop_disintegration(ty, tx)) return (FALSE);
+ if (cave_stop_disintegration(p_ptr->current_floor_ptr, ty, tx)) return (FALSE);
qx -= f1;
ty += sy;
}
if (flg & PROJECT_DISI)
{
/* Hack -- Balls explode before reaching walls */
- if (cave_stop_disintegration(ny, nx) && (rad > 0)) break;
+ if (cave_stop_disintegration(caster_ptr->current_floor_ptr, ny, nx) && (rad > 0)) break;
}
else if (flg & PROJECT_LOS)
{