'struct former' -> 'struct ebones'
Some variants were already using a similar approach using a struct called 'ebones', so adopt the same naming so NetHack-3.7, hardfought, and some variants are using the same name. As before there are fields in the struct that are not currently used by NetHack-3.7, but the intent is that hardfought save and bones files can be loaded by NetHack-3.7 without code modification, for debugging bug reports. This invalidates existing save and bones files.
This commit is contained in:
22
src/mon.c
22
src/mon.c
@@ -2567,11 +2567,11 @@ copy_mextra(struct monst *mtmp2, struct monst *mtmp1)
|
||||
assert(has_edog(mtmp2));
|
||||
*EDOG(mtmp2) = *EDOG(mtmp1);
|
||||
}
|
||||
if (FORMER(mtmp1)) {
|
||||
if (!FORMER(mtmp2))
|
||||
newformer(mtmp2);
|
||||
assert(has_former(mtmp2));
|
||||
*FORMER(mtmp2) = *FORMER(mtmp1);
|
||||
if (EBONES(mtmp1)) {
|
||||
if (!EBONES(mtmp2))
|
||||
newebones(mtmp2);
|
||||
assert(has_ebones(mtmp2));
|
||||
*EBONES(mtmp2) = *EBONES(mtmp1);
|
||||
}
|
||||
if (has_mcorpsenm(mtmp1))
|
||||
MCORPSENM(mtmp2) = MCORPSENM(mtmp1);
|
||||
@@ -2595,8 +2595,8 @@ dealloc_mextra(struct monst *m)
|
||||
free((genericptr_t) x->emin), x->emin = 0;
|
||||
if (x->edog)
|
||||
free((genericptr_t) x->edog), x->edog = 0;
|
||||
if (x->former)
|
||||
free((genericptr_t) x->former), x->former = 0;
|
||||
if (x->ebones)
|
||||
free((genericptr_t) x->ebones), x->ebones = 0;
|
||||
x->mcorpsenm = NON_PM; /* no allocation to release */
|
||||
|
||||
free((genericptr_t) x);
|
||||
@@ -3644,13 +3644,13 @@ xkilled(
|
||||
|
||||
#if 0 /* HARDFOUGHT-only at present */
|
||||
#ifdef LIVELOG
|
||||
if (has_former(mtmp) && FORMER(mtmp)->rank.mnum != NON_PM) {
|
||||
if (has_ebones(mtmp)) {
|
||||
livelog_printf(LL_UMONST, "destroyed %s, %s former %s",
|
||||
livelog_mon_nam(mtmp),
|
||||
(mtmp->data == &mons[PM_GHOST]) ? "the" : "and",
|
||||
rank_of(FORMER(mtmp)->rank.lev,
|
||||
FORMER(mtmp)->rank.mnum,
|
||||
FORMER(mtmp)->rank.female));
|
||||
rank_of(EBONES(mtmp)->deathlevel,
|
||||
EBONES(mtmp)->mnum,
|
||||
EBONES(mtmp)->female));
|
||||
}
|
||||
#endif /* LIVELOG */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user