avoid impossible() with inbound migrating mon
This commit is contained in:
@@ -64,6 +64,7 @@ enum m_ap_types {
|
|||||||
#define MON_ENDGAME_FREE 0x20
|
#define MON_ENDGAME_FREE 0x20
|
||||||
#define MON_ENDGAME_MIGR 0x40
|
#define MON_ENDGAME_MIGR 0x40
|
||||||
#define MON_OBLITERATE 0x80
|
#define MON_OBLITERATE 0x80
|
||||||
|
#define MON_STILL_ARRIVING 0x100
|
||||||
|
|
||||||
#define M_AP_TYPMASK 0x7
|
#define M_AP_TYPMASK 0x7
|
||||||
#define M_AP_F_DKNOWN 0x8
|
#define M_AP_F_DKNOWN 0x8
|
||||||
|
|||||||
@@ -1505,6 +1505,8 @@ see_monsters(void)
|
|||||||
for (mon = fmon; mon; mon = mon->nmon) {
|
for (mon = fmon; mon; mon = mon->nmon) {
|
||||||
if (DEADMONSTER(mon))
|
if (DEADMONSTER(mon))
|
||||||
continue;
|
continue;
|
||||||
|
if ((mon->mstate & MON_STILL_ARRIVING) != 0)
|
||||||
|
continue;
|
||||||
newsym(mon->mx, mon->my);
|
newsym(mon->mx, mon->my);
|
||||||
if (mon->wormno)
|
if (mon->wormno)
|
||||||
see_wsegs(mon);
|
see_wsegs(mon);
|
||||||
|
|||||||
@@ -427,6 +427,7 @@ mon_arrive(struct monst *mtmp, int when)
|
|||||||
stairway *stway;
|
stairway *stway;
|
||||||
d_level fromdlev;
|
d_level fromdlev;
|
||||||
|
|
||||||
|
mtmp->mstate |= MON_STILL_ARRIVING;
|
||||||
mtmp->nmon = fmon;
|
mtmp->nmon = fmon;
|
||||||
fmon = mtmp;
|
fmon = mtmp;
|
||||||
if (mtmp->isshk)
|
if (mtmp->isshk)
|
||||||
@@ -475,6 +476,7 @@ mon_arrive(struct monst *mtmp, int when)
|
|||||||
rloc_to(mtmp, u.ux, u.uy);
|
rloc_to(mtmp, u.ux, u.uy);
|
||||||
else
|
else
|
||||||
mnexto(mtmp, RLOC_NOMSG);
|
mnexto(mtmp, RLOC_NOMSG);
|
||||||
|
mtmp->mstate &= ~MON_STILL_ARRIVING;
|
||||||
return;
|
return;
|
||||||
} else if (when == Wiz_arrive) {
|
} else if (when == Wiz_arrive) {
|
||||||
/* resurrect() is bringing existing wizard to harass the hero */
|
/* resurrect() is bringing existing wizard to harass the hero */
|
||||||
@@ -604,6 +606,8 @@ mon_arrive(struct monst *mtmp, int when)
|
|||||||
|
|
||||||
mtmp->mx = 0; /*(already is 0)*/
|
mtmp->mx = 0; /*(already is 0)*/
|
||||||
mtmp->my = xyflags;
|
mtmp->my = xyflags;
|
||||||
|
mtmp->mstate &= ~MON_STILL_ARRIVING;
|
||||||
|
|
||||||
if (xlocale)
|
if (xlocale)
|
||||||
failed_to_place = !mnearto(mtmp, xlocale, ylocale, FALSE, RLOC_NOMSG);
|
failed_to_place = !mnearto(mtmp, xlocale, ylocale, FALSE, RLOC_NOMSG);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user