Skip to content

Commit

Permalink
Don't crash when Fedhasites kill with AUTOMATIC_HIT spells.
Browse files Browse the repository at this point in the history
See for example:

http://dobrazupa.org/morgue/Zalbag/crash-Zalbag-20151214-202335.txt

The bug affected Dispel Undead, Magic Dart, and Sticky Flame; but not
Pain or Freeze.
  • Loading branch information
neilmoore committed Dec 14, 2015
1 parent 68d89f5 commit 164a655
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crawl-ref/source/beam.cc
Expand Up @@ -1107,8 +1107,9 @@ void bolt::affect_cell()
monster *m = monster_at(pos());
if (m && can_affect_actor(m))
{
const bool ignored = ignores_monster(m);
affect_monster(m);
if ((hit == AUTOMATIC_HIT && !pierce && !ignores_monster(m))
if (hit == AUTOMATIC_HIT && !pierce && !ignored
// Assumes tracers will always have an agent!
&& (!is_tracer || m->visible_to(agent())))
{
Expand Down

0 comments on commit 164a655

Please sign in to comment.