summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 12:28:32 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 12:28:32 +0000
commit5ce6c53bfc93be25a45d95cb00e5c6bea9ef34e9 (patch)
tree2ddea46d5c0023e5a168cd8ee7bb1e4255923d08 /crawl-ref/source/monstuff.cc
parent8f6cfc7dc436f084353cadb8ec1358257947eeea (diff)
downloadcrawl-ref-5ce6c53bfc93be25a45d95cb00e5c6bea9ef34e9.tar.gz
crawl-ref-5ce6c53bfc93be25a45d95cb00e5c6bea9ef34e9.zip
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
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc6
1 files changed, 6 insertions, 0 deletions
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)