From e673127cb481843178c9d047413baf88844e438b Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 17 Dec 2009 16:43:39 +0100 Subject: Allow beams to bounce on the map border. --- crawl-ref/source/beam.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 64857c6078..affd03ce5a 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1963,7 +1963,7 @@ bool bolt::hit_wall() // Press trigger/switch/button in wall if hit by something solid // or solid-ish. - if (!is_explosion && !is_tracer && !monster_at(pos()) + if (in_bounds(pos()) && !is_explosion && !is_tracer && !monster_at(pos()) && (flavour == BEAM_MISSILE || flavour == BEAM_MMISSILE)) { dgn_event event(DET_WALL_HIT, pos());; @@ -1972,7 +1972,7 @@ bool bolt::hit_wall() dungeon_events.fire_vetoable_position_event(event, target); } - if (affects_wall(feat)) + if (in_bounds(pos()) && affects_wall(feat)) affect_wall(); else if (is_bouncy(feat) && !in_explosion_phase) bounce(); @@ -2186,7 +2186,7 @@ void bolt::do_fire() oldValue = set_buffering(false); #endif - while (in_bounds(pos())) + while (map_bounds(pos())) { path_taken.push_back(pos()); @@ -3668,7 +3668,7 @@ void bolt::reflect() // If it bounced off a wall before being reflected then head back towards // the wall. - if (bounces > 0 && in_bounds(bounce_pos)) + if (bounces > 0 && map_bounds(bounce_pos)) target = bounce_pos; else target = source; -- cgit v1.2.3-54-g00ecf