'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:
@@ -943,12 +943,12 @@ savemon(NHFILE *nhfp, struct monst *mtmp)
|
||||
if (nhfp->structlevel)
|
||||
bwrite(nhfp->fd, (genericptr_t) EDOG(mtmp), buflen);
|
||||
}
|
||||
buflen = FORMER(mtmp) ? (int) sizeof (struct former_incarnation) : 0;
|
||||
buflen = EBONES(mtmp) ? (int) sizeof (struct ebones) : 0;
|
||||
if (nhfp->structlevel)
|
||||
bwrite(nhfp->fd, (genericptr_t) &buflen, sizeof (int));
|
||||
if (buflen > 0) {
|
||||
if (nhfp->structlevel)
|
||||
bwrite(nhfp->fd, (genericptr_t) FORMER(mtmp), buflen);
|
||||
bwrite(nhfp->fd, (genericptr_t) EBONES(mtmp), buflen);
|
||||
}
|
||||
/* mcorpsenm is inline int rather than pointer to something,
|
||||
so doesn't need to be preceded by a length field */
|
||||
|
||||
Reference in New Issue
Block a user