Fix monster trapped in nonexistent trap, pt 2

Monster hiding under an item on a location with a land mine,
a rolling boulder trap launches a boulder which blows up the mine,
and all the items scatter away. If the hider survived that, it
was still hiding.
This commit is contained in:
Pasi Kallinen
2022-03-05 13:42:24 +02:00
parent 4c1d1a0666
commit d2efae280a

View File

@@ -840,6 +840,8 @@ scatter(int sx, int sy, /* location of objects to scatter */
newsym(sx, sy);
if (u_at(sx, sy) && u.uundetected && hides_under(g.youmonst.data))
(void) hideunder(&g.youmonst);
if (((mtmp = m_at(sx, sy)) != 0) && mtmp->mtrapped)
mtmp->mtrapped = 0;
if (lostgoods) /* implies shop_origin and therefore shkp valid */
credit_report(shkp, 1, FALSE);
return total;