Skip to content

Commit

Permalink
Don't crash when trying to affect a wall on the level border.
Browse files Browse the repository at this point in the history
  • Loading branch information
wheals committed Dec 30, 2015
1 parent 309898a commit 20bfd95
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions crawl-ref/source/beam.cc
Expand Up @@ -1048,14 +1048,15 @@ void bolt::affect_wall()
finish_beam();
return;
}

if (flavour == BEAM_DIGGING)
digging_wall_effect();
else if (is_fiery() || flavour == BEAM_ELECTRICITY)
burn_wall_effect();
else if (flavour == BEAM_DISINTEGRATION || flavour == BEAM_DEVASTATION)
destroy_wall_effect();

if (in_bounds(pos()))
{
if (flavour == BEAM_DIGGING)
digging_wall_effect();
else if (is_fiery() || flavour == BEAM_ELECTRICITY)
burn_wall_effect();
else if (flavour == BEAM_DISINTEGRATION || flavour == BEAM_DEVASTATION)
destroy_wall_effect();
}
if (cell_is_solid(pos()))
finish_beam();
}
Expand Down

0 comments on commit 20bfd95

Please sign in to comment.