fix broken migrating monster arrival
If the first monster on the migrating_mons list couldn't arrive and was put back on the list to try again later, 'later' would happen immediately and the program looped forever trying and failing to bring that monster to the level. Defer repeat attempts at migration until losedogs() has been through the whole migrating_mons list. mon_arrive() now populates a new list called failed_arrivals and losedog() moves its contents, if any, to migrating_mons prior to returning.
This commit is contained in:
@@ -708,7 +708,7 @@ resurrect(void)
|
||||
mtmp->mfrozen = 0, mtmp->mcanmove = 1;
|
||||
if (!helpless(mtmp)) {
|
||||
*mmtmp = mtmp->nmon;
|
||||
mon_arrive(mtmp, 0); /* 0: not With_you (1) */
|
||||
mon_arrive(mtmp, -1); /* -1: Wiz_arrive (dog.c) */
|
||||
/* note: there might be a second Wizard; if so,
|
||||
he'll have to wait til the next resurrection */
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user