From: Ari Johnson Date: Sat, 23 Apr 2011 17:58:11 +0000 (-0400) Subject: Add reboot database flag for outdesc X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=27ef84524f6adc5bb88f338b2949bd823fb85d61;p=cobramush.git Add reboot database flag for outdesc --- diff --git a/hdrs/mushdb.h b/hdrs/mushdb.h index 227bea4..1ab7c4a 100644 --- a/hdrs/mushdb.h +++ b/hdrs/mushdb.h @@ -243,5 +243,6 @@ bool unfindable(dbref); #define RDBF_PUEBLO_CHECKSUM 0x04 /* Available: 0x08 - 0x8000 */ #define RDBF_SU_EXIT_PATH 0x00010000 +#define RDBF_OUTDESC 0x00020000 #endif /* __DB_H */ diff --git a/src/bsd.c b/src/bsd.c index a12a2b1..a67e4d3 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -4811,7 +4811,7 @@ dump_reboot_db(void) DESC *d; SU_PATH *exit_path; long flags = RDBF_SCREENSIZE | RDBF_TTYPE | RDBF_PUEBLO_CHECKSUM - | RDBF_SU_EXIT_PATH; + | RDBF_SU_EXIT_PATH | RDBF_OUTDESC; if (setjmp(db_err)) { flag_broadcast(0, 0, T("GAME: Error writing reboot database!")); exit(0); @@ -4836,6 +4836,7 @@ dump_reboot_db(void) */ for (; d != NULL; d = d->prev) { putref(f, d->descriptor); + putref(f, d->outdesc); putref(f, d->connected_at); putref(f, d->hide); putref(f, d->cmds); @@ -4918,6 +4919,8 @@ load_reboot_db(void) ndescriptors++; d = (DESC *) mush_malloc(sizeof(DESC), "descriptor"); d->descriptor = val; + if (flags & RDBF_OUTDESC) + d->outdesc = getref(f); d->input_handler = do_command; d->connected_at = getref(f); d->hide = getref(f);