Fix: object detection vs mimic statue disguise

Cursed potions of object detection were showing all mimics disguised as
statues as 'i' glyphs, because object_detect used PM_TENGU as the
corpsenm of any mimic disguise.  Instead, use MCORPSENM when available
so that hidden mimics will be mapped with glyphs corresponding to their
actual disguises.
This commit is contained in:
Michael Meyer
2022-04-07 14:54:00 -04:00
committed by PatR
parent 12185138d2
commit 6bf7ba991f

View File

@@ -726,7 +726,8 @@ object_detect(struct obj *detector, /* object doing the detecting */
temp.quan = 1L;
temp.ox = mtmp->mx;
temp.oy = mtmp->my;
temp.corpsenm = PM_TENGU; /* if mimicing a corpse */
/* used for mimicking a corpse or statue */
temp.corpsenm = has_mcorpsenm(mtmp) ? MCORPSENM(mtmp) : PM_TENGU;
map_object(&temp, 1);
} else if (findgold(mtmp->minvent)
&& (!class || class == COIN_CLASS)) {