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:
@@ -1511,9 +1511,10 @@ mbirth_limit(int mndx)
|
||||
/* used for wand/scroll/spell of create monster */
|
||||
/* returns TRUE iff you know monsters have been created */
|
||||
boolean
|
||||
create_critters(int cnt,
|
||||
struct permonst *mptr, /* usually null; used for confused reading */
|
||||
boolean neverask)
|
||||
create_critters(
|
||||
int cnt,
|
||||
struct permonst *mptr, /* usually null; used for confused reading */
|
||||
boolean neverask)
|
||||
{
|
||||
coord c;
|
||||
coordxy x, y;
|
||||
|
||||
Reference in New Issue
Block a user