From fedf9161c42865e6853449f5bd701a4fef40e690 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Sat, 3 May 2014 23:17:45 -0700 Subject: 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. --- crawl-ref/source/spl-summoning.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/spl-summoning.cc') diff --git a/crawl-ref/source/spl-summoning.cc b/crawl-ref/source/spl-summoning.cc index a7974a337c..912612a7b8 100644 --- a/crawl-ref/source/spl-summoning.cc +++ b/crawl-ref/source/spl-summoning.cc @@ -2749,8 +2749,8 @@ void end_battlesphere(monster* mons, bool killed) else if (you.can_see(mons)) simple_monster_message(mons, " dissipates."); - place_cloud(CLOUD_MAGIC_TRAIL, mons->pos(), - 3 + random2(3), mons); + if (!cell_is_solid(mons->pos())) + place_cloud(CLOUD_MAGIC_TRAIL, mons->pos(), 3 + random2(3), mons); monster_die(mons, KILL_RESET, NON_MONSTER); } @@ -3418,8 +3418,8 @@ void end_grand_avatar(monster* mons, bool killed) if (!killed) { - place_cloud(CLOUD_MAGIC_TRAIL, mons->pos(), - 3 + random2(3), mons); + if (!cell_is_solid(mons->pos())) + place_cloud(CLOUD_MAGIC_TRAIL, mons->pos(), 3 + random2(3), mons); monster_die(mons, KILL_RESET, NON_MONSTER); } } -- cgit v1.2.3-54-g00ecf