diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-31 06:33:00 -0700 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-31 06:33:00 -0700 |
commit | a6fe99646bdf76151337e2217a26f6b9839510fc (patch) | |
tree | f858e312b567b87b59019b2977cdb73abd94d345 /crawl-ref | |
parent | 76596a5ea224f9ed96f1282b526a86a32032c547 (diff) | |
download | crawl-ref-a6fe99646bdf76151337e2217a26f6b9839510fc.tar.gz crawl-ref-a6fe99646bdf76151337e2217a26f6b9839510fc.zip |
monstuff.cc: Don't polymorph into slime creatures.
Polymorphing into a slime creature was crashing, because the polymorph
left the monster's number member at 0 rather than 1, so that the monster
naming code was trying to access cell -1 of an array.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 77bdebd4e3..827c7f03bf 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2136,6 +2136,10 @@ static bool _valid_morph(monsters *monster, monster_type new_mclass) // Only for use by game testers or in the arena. || new_mclass == MONS_TEST_SPAWNER + // Avoid having to set up number member (slime size). + // How is it done for hydras?? + || new_mclass == MONS_SLIME_CREATURE + // Other poly-unsuitable things. || new_mclass == MONS_ORB_GUARDIAN || mons_is_statue(new_mclass)) |