diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-18 16:16:05 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-18 16:17:49 +0200 |
commit | e750222e1317fa7cd7629771e3251c03c57e5e3c (patch) | |
tree | ca5b0c016e077822006e2ce02d7787d485aca3d8 /crawl-ref/source/los.cc | |
parent | 9441995c25655749aef0d652fbb546f8cc8ce257 (diff) | |
download | crawl-ref-e750222e1317fa7cd7629771e3251c03c57e5e3c.tar.gz crawl-ref-e750222e1317fa7cd7629771e3251c03c57e5e3c.zip |
Ensure precalculations are done before find_ray is called.
Fixes BR 2881139.
Arena mode doesn't result in a call to losight() anymore, which
was doing the precalculations before.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r-- | crawl-ref/source/los.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index 5c9f9b74c6..13ce0e0608 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -592,6 +592,9 @@ bool _find_ray_se(const coord_def& target, ray_def& ray, if (!bds(target)) return false; + // Ensure the precalculations have been done. + raycast(); + const std::vector<cellray> &min = min_cellrays(target); ASSERT(min.size() > 0); cellray c = min[0]; // XXX: const cellray &c ? |