From d331029b037f98a58098c4b91b195f3de85d450c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 2 Feb 2025 09:08:48 -0500 Subject: [PATCH] more clobber-detection --- include/mextra.h | 1 + include/patchlevel.h | 2 +- src/makemon.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/mextra.h b/include/mextra.h index 0089991af..7f0d00f46 100644 --- a/include/mextra.h +++ b/include/mextra.h @@ -183,6 +183,7 @@ struct edog { }; struct former_incarnation { + unsigned parentmid; /* make clobber-detection possible */ char rank[25]; /* for bones' ghost rank in their former life */ }; diff --git a/include/patchlevel.h b/include/patchlevel.h index ce5efe227..9149b3b5f 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -17,7 +17,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 116 +#define EDITLEVEL 117 /* * Development status possibilities. diff --git a/src/makemon.c b/src/makemon.c index 62de076b6..9e62c168b 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1080,6 +1080,7 @@ newformer(struct monst *mtmp) sizeof(struct former_incarnation *)); (void) memset((genericptr_t) FORMER(mtmp), 0, sizeof(struct former_incarnation *)); + FORMER(mtmp)->parentmid = mtmp->m_id; } }