diff options
author | Eduardo Gonzalez <ed.gonzalez3@gmail.com> | 2014-05-03 23:17:45 -0700 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-08-15 15:55:25 -0400 |
commit | fedf9161c42865e6853449f5bd701a4fef40e690 (patch) | |
tree | d20b25bbd787afce90bf00b98ca9e5a4c0dc251f /crawl-ref/source/mon-death.cc | |
parent | 0d61daab317636fdbfa7b6100f41aa3d67bfe514 (diff) | |
download | crawl-ref-fedf9161c42865e6853449f5bd701a4fef40e690.tar.gz crawl-ref-fedf9161c42865e6853449f5bd701a4fef40e690.zip |
Don't crash if a battlesphere or avatar expires inside a wall (#8448)
All the other monsters that place clouds on death make a safety check
that the cell isn't solid. Update these two summons to match.
Diffstat (limited to 'crawl-ref/source/mon-death.cc')
-rw-r--r-- | crawl-ref/source/mon-death.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-death.cc b/crawl-ref/source/mon-death.cc index c31c2659fa..4ed47824b1 100644 --- a/crawl-ref/source/mon-death.cc +++ b/crawl-ref/source/mon-death.cc @@ -1719,8 +1719,11 @@ int monster_die(monster* mons, killer_type killer, } else if (mons->type == MONS_BATTLESPHERE) { - if (!wizard && !mons_reset && !was_banished) + if (!wizard && !mons_reset && !was_banished + && !cell_is_solid(mons->pos())) + { place_cloud(CLOUD_MAGIC_TRAIL, mons->pos(), 3 + random2(3), mons); + } end_battlesphere(mons, true); } else if (mons->type == MONS_BRIAR_PATCH) |