From 5ce6c53bfc93be25a45d95cb00e5c6bea9ef34e9 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sun, 18 Jan 2009 12:28:32 +0000 Subject: Fix bug #2482254: a giant spore exploding was having the mgrd where it used to be set to NON_MONSTER *twice*, the second time after the royal jelly had responded to the explosion and spat out a new jelly on the spot the spore used to occupy, leading to the new jelly becoming detached from the mgrd. Allowing the royal jelly to be radnomly generated in the arena with the random_uniques tag, since it's no longer causing a crash. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8545 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 831fbddc15..2529eca193 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -957,6 +957,12 @@ static bool _spore_goes_pop(monsters *monster, killer_type killer, // its own explosion. (GDL) mgrd(monster->pos()) = NON_MONSTER; + // The explosion might cause a monster to be placed where the spore + // used to be, so make sure that mgrd() doesn't get cleared a second + // time (causing the new monster to become floating) when + // monster->reset() is called. + monster->pos().reset(); + // Exploding kills the monster a bit earlier than normal. monster->hit_points = -16; if (saw) -- cgit v1.2.3-54-g00ecf