improve full level handling in the endgame
Even though a goodpos failure in mnearto() would return 0 to the caller and trigger proper overcrowding handling for mtmp, the 'othermon' would be left with its mx,my set to 0,0 under that circumstance and then trigger a mon_sanity_check() failure and accompanying impossible() message a short while afterwards. This also includes the addition of some flags that proved useful for troubleshooting the mystery sanity_check failure and helping to understand some of the code paths the struct monst data had been through. They are only used for inspection when issues are reported or when debugging, they don't presently control the code flow. Their setting and use is done in an overloaded way that should not intrude on the existing use of mspare1 for MIGR_LEFTOVERS. mon->mstate is just a pseudonym for mon->mspare1 and does not alter save file content.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1558485640 2019/05/22 00:40:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.706 $ */
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1559422206 2019/06/01 20:50:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.707 $ */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1394,6 +1394,7 @@ E int FDECL(can_carry, (struct monst *, struct obj *));
|
||||
E int FDECL(mfndpos, (struct monst *, coord *, long *, long));
|
||||
E boolean FDECL(monnear, (struct monst *, int, int));
|
||||
E void NDECL(dmonsfree);
|
||||
E void FDECL(elemental_clog, (struct monst *));
|
||||
E int FDECL(mcalcmove, (struct monst *));
|
||||
E void NDECL(mcalcdistress);
|
||||
E void FDECL(replmon, (struct monst *, struct monst *));
|
||||
|
||||
Reference in New Issue
Block a user