if (mon_invis) return;
/* Hack -- Prevent monster lite leakage in walls */
+
+ /* Horizontal walls between player and a monster */
if (((y < py) && (y > mon_fy)) || ((y > py) && (y < mon_fy)))
{
midpoint = (px + mon_fx) >> 1;
+
+ /* Only first wall viewed from mid-x is lit */
if (x < midpoint)
{
if (!cave_floor_bold(y, x + 1)) return;
if (!cave_floor_bold(y, x - 1)) return;
}
}
- else if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx)))
+
+ /* Vertical walls between player and a monster */
+ if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx)))
{
midpoint = (py + mon_fy) >> 1;
+
+ /* Only first wall viewed from mid-y is lit */
if (y < midpoint)
{
if (!cave_floor_bold(y + 1, x)) return;
if (mon_invis) return;
/* Hack -- Prevent monster dark lite leakage in walls */
+
+ /* Horizontal walls between player and a monster */
if (((y < py) && (y > mon_fy)) || ((y > py) && (y < mon_fy)))
{
midpoint = (px + mon_fx) >> 1;
+
+ /* Only first wall viewed from mid-x is darkened */
if (x < midpoint)
{
if (!cave_floor_bold(y, x + 1)) return;
if (!cave_floor_bold(y, x - 1)) return;
}
}
- else if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx)))
+
+ /* Vertical walls between player and a monster */
+ if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx)))
{
midpoint = (py + mon_fy) >> 1;
+
+ /* Only first wall viewed from mid-y is darkened */
if (y < midpoint)
{
if (!cave_floor_bold(y + 1, x)) return;