Several things that break savefile compatibility

- Version change from 3.4.x
- timed_delay feature ignore in makedefs
- several flags from iflags to flags
- use offsets from mons array entries in save file rather than storing
  the ptr and calculating the distance from beginning of array
This commit is contained in:
nethack.allison
2003-03-05 04:39:47 +00:00
parent 14c53eb840
commit 5122409416
13 changed files with 54 additions and 59 deletions

View File

@@ -274,7 +274,6 @@ savegamestate(fd, mode)
register int fd, mode;
{
int uid;
#ifdef MFLOPPY
count_only = (mode & COUNT_SAVE);
#endif
@@ -875,14 +874,11 @@ register struct monst *mtmp;
register struct monst *mtmp2;
unsigned int xl;
int minusone = -1;
struct permonst *monbegin = &mons[0];
if (perform_bwrite(mode))
bwrite(fd, (genericptr_t) &monbegin, sizeof(monbegin));
while (mtmp) {
mtmp2 = mtmp->nmon;
if (perform_bwrite(mode)) {
mtmp->mnum = monsndx(mtmp->data);
xl = mtmp->mxlth + mtmp->mnamelth;
bwrite(fd, (genericptr_t) &xl, sizeof(int));
bwrite(fd, (genericptr_t) mtmp, xl + sizeof(struct monst));