more abandoned migrations when entering endgame

The earlier commit just removed monsters from migrating_mons and left
them orphaned.  Also it ignored migrating objects.

Actually release the monsters that can no longer arrive at their
migration destinations.  Release their inventories too.

Release objects that can no longer arrive at migration destinations.
This commit is contained in:
PatR
2022-08-05 16:55:05 -07:00
parent 7a3c11ec6b
commit a84025c36c
3 changed files with 37 additions and 11 deletions

View File

@@ -1463,8 +1463,8 @@ goto_level(
/* mark #overview data for all dungeon branches as uninteresting */
for (l_idx = 0; l_idx < g.n_dgns; ++l_idx)
remdun_mapseen(l_idx);
/* get rid of monsters scheduled to migrate to discarded levels */
discard_migrating_mons();
/* get rid of mons & objs scheduled to migrate to discarded levels */
discard_migrations();
}
if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz))