diff --git a/include/patchlevel.h b/include/patchlevel.h index c2435f23a..070c25f4f 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 138 +#define EDITLEVEL 139 /* * Development status possibilities. diff --git a/src/restore.c b/src/restore.c index ac68c879e..7cb18b168 100644 --- a/src/restore.c +++ b/src/restore.c @@ -351,6 +351,8 @@ restmon(NHFILE *nhfp, struct monst *mtmp) if (buflen > 0) { newedog(mtmp); Sfi_edog(nhfp, EDOG(mtmp), "monst-edog"); + /* save or bones held a relative time */ + relative_time_to_moves(&EDOG(mtmp)->droptime); /* sanity check to prevent rn2(0) */ if (EDOG(mtmp)->apport <= 0) { EDOG(mtmp)->apport = 1; diff --git a/src/save.c b/src/save.c index e2c0ac5f9..3937746cd 100644 --- a/src/save.c +++ b/src/save.c @@ -853,7 +853,10 @@ savemon(NHFILE *nhfp, struct monst *mtmp) buflen = EDOG(mtmp) ? (int) sizeof (struct edog) : 0; Sfo_int(nhfp, &buflen, "monst-edog_length"); if (buflen > 0) { + /* we only store relative times in save and bones */ + moves_to_relative_time(&EDOG(mtmp)->droptime); Sfo_edog(nhfp, EDOG(mtmp), "monst-edog"); + relative_time_to_moves(&EDOG(mtmp)->droptime); } buflen = EBONES(mtmp) ? (int) sizeof (struct ebones) : 0; Sfo_int(nhfp, &buflen, "monst-ebones_length");