summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/los.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-08 22:52:03 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-08 22:52:03 +0200
commitac38661a15a4ac915e6b5b59dc4aabe5ae5da05c (patch)
treef3e4ebf119a5693325da72b3f8ce66c47818186a /crawl-ref/source/los.cc
parentd87a308f449bb959db24495e2a1dc307924bc8ae (diff)
downloadcrawl-ref-ac38661a15a4ac915e6b5b59dc4aabe5ae5da05c.tar.gz
crawl-ref-ac38661a15a4ac915e6b5b59dc4aabe5ae5da05c.zip
Move can_go_straight from los.cc to monstuff.cc.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r--crawl-ref/source/los.cc19
1 files changed, 0 insertions, 19 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc
index f585b65d58..14dc1e3f6c 100644
--- a/crawl-ref/source/los.cc
+++ b/crawl-ref/source/los.cc
@@ -692,25 +692,6 @@ bool cell_see_cell(const coord_def& p1, const coord_def& p2)
return see_grid(show, p1, p2);
}
-// Checks whether there is a straight path from p1 to p2 that passes
-// through features >= allowed.
-// If it exists, such a path may be missed; on the other hand, it
-// is not guaranteed that p2 is visible from p1 according to LOS rules.
-// Not symmetric.
-bool can_go_straight(const coord_def& p1, const coord_def& p2,
- dungeon_feature_type allowed)
-{
- if (distance(p1, p2) > _los_radius_squared)
- return (false);
-
- dungeon_feature_type max_disallowed = DNGN_MAXOPAQUE;
- if (allowed != DNGN_UNSEEN)
- max_disallowed = static_cast<dungeon_feature_type>(allowed - 1);
-
- return (!num_feats_between(p1, p2, DNGN_UNSEEN, max_disallowed,
- true, true));
-}
-
// The rule behind LOS is:
// Two cells can see each other if there is any line from some point
// of the first to some point of the second ("generous" LOS.)