Re: Obuild crashbug fix (last one?)

From: Sammy (samedi@DHC.NET)
Date: 07/14/97


> So i recomend you use Obuild. It patches perfectly (but so does Oasis
> they all cry!), and has only ONE BUG which everyone knows about - You
> cannot modifed an object or mob that is currently exsists. The
> solution - just kill / purge the room with the exsisting _thing_ you
> want to modify. And DONE!

Actually that's been fixed (again).  Paul Stewart sent me the
following fix which I lost for a while but just found again:

Date: Wed, 23 Apr 1997 01:28:25 +0100
From: Paul Stewart <stew@enterprise.net>
To: Sammy <samedi@dhc.net>
Subject: Re: bug in obuild

ok, here it is... and it works!  I was still getting occasional crashes
the way I did it before.

In msave, move the fix_mob_strings to after the copy_mob and change to
the following:

void fix_mob_strings(struct char_data * proto, struct char_data *
buffer)
{
  struct char_data *i;

  for(i = character_list; i; i = i->next) {
    if(IS_NPC(i) && i->nr == buffer->nr) {
      if(i->player.name && i->player.name != buffer->player.name)
        i->player.name = proto->player.name;
      if(i->player.short_descr && i->player.short_descr !=
buffer->player.short_descr)
        i->player.short_descr = proto->player.short_descr;
      if(i->player.long_descr && i->player.long_descr !=
buffer->player.long_descr)
        i->player.long_descr = proto->player.long_descr;
      if(i->player.description && i->player.description !=
buffer->player.description)
        i->player.description = proto->player.description;
    }
  }
}

I did the exact same to fix_obj_strings.
--
Paul Stewart

Sam


      +-----------------------------------------------------------+
      | Ensure that you have read the CircleMUD Mailing List FAQ: |
      |   http://cspo.queensu.ca/~fletcher/Circle/list-faq.html   |
      +-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST