--- deliantra/server/common/map.C 2006/08/28 14:05:23 1.10 +++ deliantra/server/common/map.C 2006/08/28 16:12:59 1.11 @@ -1,6 +1,6 @@ /* * static char *rcsid_map_c = - * "$Id: map.C,v 1.10 2006/08/28 14:05:23 root Exp $"; + * "$Id: map.C,v 1.11 2006/08/28 16:12:59 root Exp $"; */ /* @@ -795,7 +795,7 @@ * return 0 on success, 1 on failure. */ -static int load_map_header(FILE *fp, mapstruct *m) +static int load_map_header(object_thawer &fp, mapstruct *m) { char buf[HUGE_BUF], msgbuf[HUGE_BUF], maplorebuf[HUGE_BUF], *key=NULL, *value, *end; int msgpos=0; @@ -895,7 +895,9 @@ * for compatibility reasons. The new values (second) are * what really should be used. */ - else if (!strcmp(key,"hp") || !strcmp(key, "enter_x")) { + else if (!strcmp(key,"oid")) { + fp.get (m, atoi(value)); + } else if (!strcmp(key,"hp") || !strcmp(key, "enter_x")) { m->enter_x = atoi(value); } else if (!strcmp(key,"sp") || !strcmp(key, "enter_y")) { m->enter_y = atoi(value); @@ -1038,7 +1040,7 @@ m = get_linked_map(); strcpy (m->path, filename); - if (load_map_header(fp, m)) { + if (load_map_header(thawer, m)) { LOG(llevError,"Error loading map header for %s, flags=%d\n", filename, flags); delete_map(m); @@ -1468,6 +1470,9 @@ if (!m) return; + + m->clear (); + if (m->in_memory == MAP_IN_MEMORY) { /* change to MAP_SAVING, even though we are not, * so that remove_ob doesn't do as much work.