summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-12-17 16:34:57 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-12-17 16:34:57 +0100
commitbbe853ff8b4b1fdd70055dae83148b717413c127 (patch)
treeb650b1a06ba1bf3ce15b88bcd07f3b6f570e4f44 /crawl-ref/source/beam.cc
parent354816b2ff6361a8286a547c0c130e0de170f0a7 (diff)
downloadcrawl-ref-bbe853ff8b4b1fdd70055dae83148b717413c127.tar.gz
crawl-ref-bbe853ff8b4b1fdd70055dae83148b717413c127.zip
Fix crash when targetting the map boundary.
Fixes bug #151.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 7f44ec6ffc..64857c6078 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2236,16 +2236,16 @@ void bolt::do_fire()
avoid_self = false;
}
- if (!in_bounds(pos()))
+ if (!map_bounds(pos()))
{
ASSERT(!aimed_at_spot);
int tries = std::max(GXM, GYM);
- while (!in_bounds(ray.pos()) && tries-- > 0)
+ while (!map_bounds(ray.pos()) && tries-- > 0)
ray.regress();
// Something bizarre happening if we can't get back onto the map.
- ASSERT(in_bounds(pos()));
+ ASSERT(map_bounds(pos()));
}
// The beam has terminated.