Fix panic on thrown potion of acid when swallowed

When you're swallowed and throw a missile that kills the swallower,
the thrown missile is picked up by the swallower before death.
This caused a panic when you threw a potion, which was first picked up
by the swallower, which upon death dropped the potion on the floor,
but then throw code was trying to destroy the potion ...
This commit is contained in:
Pasi Kallinen
2022-04-19 14:56:51 +03:00
parent 9f0e511b00
commit af7db2f8f1

View File

@@ -2989,6 +2989,8 @@ xkilled(
EDOG(mtmp)->killed_by_u = 1;
if (wasinside && g.thrownobj && g.thrownobj != uball
/* don't give to mon if missile is going to be destroyed */
&& g.thrownobj->oclass != POTION_CLASS
/* don't give to mon if missile is going to return to hero */
&& g.thrownobj != (struct obj *) iflags.returning_missile) {
/* thrown object has killed hero's engulfer; add it to mon's