summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-08 16:29:24 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-08 17:01:14 +0100
commit6bdaccfb8c194bfa0bb0b6769babc3710d570b45 (patch)
treedce34efa2202539e5a8ea704cdaa46b17fd1969c /crawl-ref/source/effects.cc
parent19c3c95b8dba465b3efacf8eb96798af69c170fc (diff)
downloadcrawl-ref-6bdaccfb8c194bfa0bb0b6769babc3710d570b45.tar.gz
crawl-ref-6bdaccfb8c194bfa0bb0b6769babc3710d570b45.zip
Move see_cell_no_trans into player.
Also collect actor/player LOS code in actor-los.cc.
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 1c1f87e35c..c88216ee35 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -4347,7 +4347,7 @@ int place_ring(std::vector<coord_def> &ring_points,
// Collect lists of points that are within LOS (under the given env map),
// unoccupied, and not solid (walls/statues).
void collect_radius_points(std::vector<std::vector<coord_def> > &radius_points,
- const coord_def &origin, const env_show_grid &losgrid)
+ const coord_def &origin, const los_def &los)
{
radius_points.clear();
@@ -4404,7 +4404,7 @@ void collect_radius_points(std::vector<std::vector<coord_def> > &radius_points,
coord_dist temp(*i, current.second);
// If the grid is out of LOS, skip it.
- if (!see_cell(losgrid, origin, temp.first))
+ if (!los.see_cell(temp.first))
continue;
coord_def local = temp.first - origin;
@@ -4437,10 +4437,9 @@ static int _mushroom_ring(item_def &corpse, int & seen_count,
std::vector<std::vector<coord_def> > radius_points;
- env_show_grid losgrid;
- losight(losgrid, corpse.pos, opc_solid);
+ los_def los(corpse.pos, opc_solid);
- collect_radius_points(radius_points, corpse.pos, losgrid);
+ collect_radius_points(radius_points, corpse.pos, los);
// So what we have done so far is collect the set of points at each radius
// reachable from the origin with (somewhat constrained) 8 connectivity,