Re: Latest DG script patch

From: Artovil (
Date: 07/12/02

At 10:10 2002-07-12 +0200, you wrote:
>From: "The Fungi" <>
> > This is great. I have only one question... I see no fix for my
> > earlier reported bug and now I'm begining to think that maybe it
> > isn't a bug but rather an intentional design feature. Room triggers
> > set using redit don't show up instantly or after a zreset, but
> > instead require a reboot of the MUD. Yet "attach wtr..." seems to be
> > working fine immediately. Was there a specific reason to wait for a
> > reboot to attach? I can easily provide a patch that fixes this but I
> > thought maybe it was a bad idea for some reason I can't fathom.
> >
>It is fixed in pl8 - I tried hard to only let updates to bpl21 get into
>that update. pl8 takes care of a number of bugs as well as adds
>functionality. This is a short fix :
>      return;
>    }
>-  /* Set script for this room */
>-  world[room_num].proto_script = OLC_SCRIPT(d);
>+  /* Attach Script */
>+  OLC_ROOM(d)->proto_script = OLC_SCRIPT(d);
>+  assign_triggers(&world[room_num], WLD_TRIGGER);
>    /* Don't adjust numbers on a room update. */
>    if (!new_room)
>@@ -196,15 +449,13 @@ void redit_save_internally(struct descri
>              OLC_ROOM(dsc)->dir_option[j]->to_room++;
>      }
>    }
>-  assign_triggers(&world[room_num], WLD_TRIGGER);
>  }

I tried this, and it works fine, but, now, if you try this:
redit; s; x; q; n
And then type redit, it crashes. At least in my mud.
A check for proto in redit_setup_existing() fixed that, as well as for
adding a script, and then quitting. The script will be there, still, even
though you selected not to save changes.  If you try the same thing but
this time you remove the trigger, and choose not to save changes, it will
crash the next time you open redit.

Or have I missed some lines in a patch somewhere?


   | FAQ: |
   | Archives: |
   | Newbie List:   |

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