From bbe853ff8b4b1fdd70055dae83148b717413c127 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 17 Dec 2009 16:34:57 +0100 Subject: Fix crash when targetting the map boundary. Fixes bug #151. --- crawl-ref/source/beam.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source') 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. -- cgit v1.2.3-54-g00ecf