Re: Oasis Room save bug

From: Kras Kresh (kras_kresh@hotmail.com)
Date: 03/24/02


I've implemented on of the two fixes I thought of, but it may not be
completely safe if you were to use copy_room() elsewhere. So far, it is only
used in genwld.c where you update an existing room. I've tested my fix and
it seems to work just fine. Your MUD probably won't have the storm lines
I've added, but it may have other things which you should replace storm
with.

+/* define as 1 to fix redit bug of restoring old people/obj list
+ * and storm time
+ */
+#define KRAS_FIX        1

int copy_room(struct room_data *to, struct room_data *from)
{
+#if KRAS_FIX
+  struct char_data *people = to->people;
+  struct obj_data *contents = to->contents;
+  byte storm = to->storm;
+#endif
+
  free_room_strings(to);
  *to = *from;
+
+#if KRAS_FIX
+  to->people = people;
+  to->contents = contents;
+  to->storm = storm;
+#endif
+
  copy_room_strings(to, from);

  /* Don't put people and objects in two locations.
     Am thinking this shouldn't be done here... */
  from->people = NULL;
  from->contents = NULL;

  return TRUE;
}

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT