diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-25 16:33:16 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-25 16:33:41 +0100 |
commit | 5e1b1aeec721082e65edba8538c7293f922fa030 (patch) | |
tree | 0808140f27a1417a51a16a493f352bb863cd1ad2 /crawl-ref/source/travel.cc | |
parent | 21060a38ec5f533d3cfc5614418c7ff8fecfabb1 (diff) | |
download | crawl-ref-5e1b1aeec721082e65edba8538c7293f922fa030.tar.gz crawl-ref-5e1b1aeec721082e65edba8538c7293f922fa030.zip |
Revert "Convert exclusions to los_def."
This reverts commit 7afa089db8b01b1810c5903309f7302545638550.
los_def is currently buggy, leading to weird behaviour when
deleting exclusions.
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r-- | crawl-ref/source/travel.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 83ac8e9363..c42131916b 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -301,11 +301,11 @@ int travel_exclude::radius_sq() const return (radius > 0 ? radius*radius + 1 : 0); } -void travel_exclude::set_los() +void travel_exclude::set_exclude_show() { uptodate = true; if (radius > 0) - los.init(pos, opc_excl, bounds_radius_sq(radius_sq())); + losight(show, pos, opc_excl, bounds_radius_sq(radius_sq())); } bool travel_exclude::affects(const coord_def& p) const @@ -315,13 +315,13 @@ bool travel_exclude::affects(const coord_def& p) const pos.x, pos.y, p.x, p.y); if (radius == 0) return (p == pos); - return (los.see_cell(p)); + return (see_cell(show, pos, p)); } void init_exclusion_los() { for (unsigned int i = 0; i < curr_excludes.size(); i++) - curr_excludes[i].set_los(); + curr_excludes[i].set_exclude_show(); } void _mark_excludes_non_updated(const coord_def &p) @@ -335,7 +335,7 @@ void _update_exclusion_los(bool all=false) { for (unsigned int i = 0; i < curr_excludes.size(); i++) if (all || !curr_excludes[i].uptodate) - curr_excludes[i].set_los(); + curr_excludes[i].set_exclude_show(); } /* @@ -502,7 +502,7 @@ void set_exclude(const coord_def &p, int radius, bool autoexcl, bool vaultexcl) if (travel_exclude *exc = _find_exclude_root(p)) { exc->radius = radius; - exc->set_los(); + exc->set_exclude_show(); } else { |