add mexta field to simplify detection of overwrite

Because this invalidates existing save and bones files,
an increment of EDITLEVEL will accompany this.
This commit is contained in:
nhmall
2025-02-02 08:30:48 -05:00
parent 6431f4727c
commit d74624abbd
6 changed files with 10 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ struct fakecorridor {
};
struct egd {
unsigned parentmid; /* make clobber-detection possible */
int fcbeg, fcend; /* fcend: first unused pos */
int vroom; /* room number of the vault */
coordxy gdx, gdy; /* goal of guard's walk */
@@ -92,6 +93,7 @@ struct egd {
** formerly epri.h -- temple priest extension
*/
struct epri {
unsigned parentmid; /* make clobber-detection possible */
aligntyp shralign; /* alignment of priest's shrine */
schar shroom; /* index in rooms */
coord shrpos; /* position of shrine */
@@ -118,6 +120,7 @@ struct bill_x {
};
struct eshk {
unsigned parentmid; /* make clobber-detection possible */
long robbed; /* amount stolen by most recent customer */
long credit; /* amount credited to customer */
long debit; /* amount of debt for using unpaid items */
@@ -145,6 +148,7 @@ struct eshk {
** formerly emin.h -- minion extension
*/
struct emin {
unsigned parentmid; /* make clobber-detection possible */
aligntyp min_align; /* alignment of minion */
boolean renegade; /* hostile co-aligned priest or Angel */
};
@@ -165,6 +169,7 @@ enum dogfood_types {
};
struct edog {
unsigned parentmid; /* make clobber-detection possible */
long droptime; /* moment dog dropped object */
unsigned dropdist; /* dist of dropped obj from @ */
int apport; /* amount of training */

View File

@@ -27,6 +27,7 @@ newedog(struct monst *mtmp)
if (!EDOG(mtmp)) {
EDOG(mtmp) = (struct edog *) alloc(sizeof(struct edog));
(void) memset((genericptr_t) EDOG(mtmp), 0, sizeof(struct edog));
EDOG(mtmp)->parentmid = mtmp->m_id;
}
}

View File

@@ -21,6 +21,7 @@ newemin(struct monst *mtmp)
if (!EMIN(mtmp)) {
EMIN(mtmp) = (struct emin *) alloc(sizeof(struct emin));
(void) memset((genericptr_t) EMIN(mtmp), 0, sizeof(struct emin));
EMIN(mtmp)->parentmid = mtmp->m_id;
}
}

View File

@@ -20,6 +20,7 @@ newepri(struct monst *mtmp)
if (!EPRI(mtmp)) {
EPRI(mtmp) = (struct epri *) alloc(sizeof(struct epri));
(void) memset((genericptr_t) EPRI(mtmp), 0, sizeof(struct epri));
EPRI(mtmp)->parentmid = mtmp->m_id;
}
}

View File

@@ -561,6 +561,7 @@ neweshk(struct monst *mtmp)
if (!ESHK(mtmp))
ESHK(mtmp) = (struct eshk *) alloc(sizeof(struct eshk));
(void) memset((genericptr_t) ESHK(mtmp), 0, sizeof(struct eshk));
ESHK(mtmp)->parentmid = mtmp->m_id;
ESHK(mtmp)->bill_p = (struct bill_x *) 0;
}

View File

@@ -27,6 +27,7 @@ newegd(struct monst *mtmp)
if (!EGD(mtmp)) {
EGD(mtmp) = (struct egd *) alloc(sizeof (struct egd));
(void) memset((genericptr_t) EGD(mtmp), 0, sizeof (struct egd));
EGD(mtmp)->parentmid = mtmp->m_id;
}
}