discarding migrating objects when entering endgame

Avoid potential impossible "obfree: deleting worn object" warnings
when entering the endgame.

The code to get rid of items migrating to non-endgame levels passes
those items to obfree().  It needs to clear obj->owornmask first
because that's used for migration flags (undelivered orctown loot
has a non-zero value).
This commit is contained in:
PatR
2022-09-03 10:45:24 -07:00
parent f5a9901db1
commit 82aaa289ef
3 changed files with 14 additions and 10 deletions

View File

@@ -1433,9 +1433,10 @@ drop_to(coord *cc, schar loc, coordxy x, coordxy y)
/* player or missile impacts location, causing objects to fall down */
void
impact_drop(struct obj *missile, /* caused impact, won't drop itself */
coordxy x, coordxy y, /* location affected */
xint16 dlev) /* if !0 send to dlev near player */
impact_drop(
struct obj *missile, /* caused impact, won't drop itself */
coordxy x, coordxy y, /* location affected */
xint16 dlev) /* if !0 send to dlev near player */
{
schar toloc;
register struct obj *obj, *obj2;