summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-15 11:31:01 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-15 11:36:21 +0200
commitebf5a248635cf60c77083a6f6e2c13a6ac765cda (patch)
tree736c407dc0a3b7f83129eea2522b40049de25638 /crawl-ref/source/beam.cc
parent26cadc029618115ae85103c807ea38b7f52c3838 (diff)
downloadcrawl-ref-ebf5a248635cf60c77083a6f6e2c13a6ac765cda.tar.gz
crawl-ref-ebf5a248635cf60c77083a6f6e2c13a6ac765cda.zip
Remove fallback calculation from find_ray.
There is now a separate fallback_ray() that needs to be called explicitly. I've manually converted uses of find_ray with allow_fallback == true. find_ray with allow_fallback set always returned true, yet there were a number of places that used the return value, in particular in directn.cc. I'll check these later.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index de692872c5..e87cfbd906 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1591,7 +1591,10 @@ void bolt::apply_beam_conducts()
void bolt::choose_ray()
{
if (!chose_ray || reflections > 0)
- find_ray(source, target, true, ray, 0, true);
+ {
+ if (!find_ray(source, target, ray, 0, true))
+ fallback_ray(source, target, ray);
+ }
}
// Draw the bolt at p if needed.
@@ -2844,7 +2847,7 @@ bool check_line_of_sight(const coord_def& source, const coord_def& target)
// Note that we are guaranteed to be within the player LOS range,
// so fallback is unnecessary.
ray_def ray;
- return find_ray(source, target, false, ray);
+ return find_ray(source, target, ray);
}
// When a mimic is hit by a ranged attack, it teleports away (the slow