fix #H7530 - corpse from corpseless monster
Migrating monster attempting to arrive on a level which is already full of monsters gets killed off. It was leaving a corpse without regard for whether it was a type of of monster which should never leave corpses. I'd prefer that it be put back on the migrating_mons list rather than be killed off, but this just suppresses impossible corpses.
This commit is contained in:
@@ -29,6 +29,7 @@ STATIC_DCL struct obj *FDECL(make_corpse, (struct monst *, unsigned));
|
||||
STATIC_DCL void FDECL(m_detach, (struct monst *, struct permonst *));
|
||||
STATIC_DCL void FDECL(lifesaved_monster, (struct monst *));
|
||||
|
||||
/* note: duplicated in dog.c */
|
||||
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \
|
||||
(Is_rogue_level(&u.uz) \
|
||||
|| (level.flags.graveyard && is_undead(mdat) && rn2(3)))
|
||||
@@ -446,7 +447,8 @@ unsigned corpseflags;
|
||||
}
|
||||
/* All special cases should precede the G_NOCORPSE check */
|
||||
|
||||
if (!obj) return NULL;
|
||||
if (!obj)
|
||||
return (struct obj *) 0;
|
||||
|
||||
/* if polymorph or undead turning has killed this monster,
|
||||
prevent the same attack beam from hitting its corpse */
|
||||
|
||||
Reference in New Issue
Block a user