summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/art-func.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-04 19:20:56 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-05 05:14:16 +0100
commit5114b4b827b5b56b3f5e6a204c682c3ac77ad755 (patch)
tree183b95a620df7b62a21223605ad877f85beb75cc /crawl-ref/source/art-func.h
parent1f1809d2796684ad03af05bea3754acb0e2e513d (diff)
downloadcrawl-ref-5114b4b827b5b56b3f5e6a204c682c3ac77ad755.tar.gz
crawl-ref-5114b4b827b5b56b3f5e6a204c682c3ac77ad755.zip
Get rid of the radius_iterator "legacy" constructor.
It was really weird: working on a square, but in almost all cases restricting it to your view (a circle). Note this is _your_ view rather than from the iterator's center -- which hasn't been used once in the obvious interesting way. As usual, this commit fixes a load of "act through glass" bugs, ando/or using los modes that don't make sense in the context.
Diffstat (limited to 'crawl-ref/source/art-func.h')
-rw-r--r--crawl-ref/source/art-func.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h
index 4c36e204c4..b56b0bf54a 100644
--- a/crawl-ref/source/art-func.h
+++ b/crawl-ref/source/art-func.h
@@ -571,7 +571,7 @@ static void _STORM_BOW_world_reacts(item_def *item)
if (!one_chance_in(300))
return;
- for (radius_iterator ri(you.pos(), 2); ri; ++ri)
+ for (radius_iterator ri(you.pos(), 2, C_ROUND, LOS_SOLID); ri; ++ri)
if (!cell_is_solid(*ri) && env.cgrid(*ri) == EMPTY_CLOUD && one_chance_in(5))
place_cloud(CLOUD_RAIN, *ri, random2(20), &you, 3);
}
@@ -602,7 +602,7 @@ static void _RCLOUDS_world_reacts(item_def *item)
else
cloud = CLOUD_MIST;
- for (radius_iterator ri(you.pos(), 2); ri; ++ri)
+ for (radius_iterator ri(you.pos(), 2, C_ROUND, LOS_SOLID); ri; ++ri)
if (!cell_is_solid(*ri) && env.cgrid(*ri) == EMPTY_CLOUD
&& one_chance_in(20))
{