Re: [CODE] perform_immort_invis bugfix

From: Patrick Dughi (dughi@imaxx.net)
Date: 02/19/00


> No. It's more complicated.
> If you order all charmies to kill 2nd charmie and 1st charmie kills 2nd
> charmie - MUD will crash because pointer to 2nd charmie is invalid.
> The solution is (I posted it long time ago):

        >SNIPPED HERE<

> Btw, currently few more functions have potential crash bugs of that
> type. They can be rewritten using additional variable (cloop_member)
> for vict's existence checking. The basic algorythm:
>  1) Cycle through victims, mark them
>  2) Cycle through victims, lookup marked ones and perform actions.
>     After every action performed, resume at 1st member of list.

        Actually, I did this, and I'm pretty sure I even posted the
snippet to do so on the list after having some problems with mobs that
were spec_proc'ed killing or otherwise removing themselves from the game.
I don't think I heard any feed back from it though...

letseee..for info, examine
http://post.queensu.ca/cgi-bin/listserv/wa?A2=ind9909&L=circle&P=R3268
http://post.queensu.ca/cgi-bin/listserv/wa?A2=ind9909&L=circle&P=R3653

Both show up.. looks like i said I'd write a patch on it...hey.. i did.
ftp://ftp.circlemud.org/pub/CircleMUD/contrib/code/moblists.README
ftp://ftp.circlemud.org/pub/CircleMUD/contrib/code/moblists.tar.gz

        But I don't see me actually identifying the fact that I put the
code out for public consumption. Whoops. Now you know.  It actually wraps
everything, apparently I did it in a clever manner, and so it's applicable
with mobprogs/spec_procs/misc killings/dgscripts/etc. Damn, I'm fine :)

        I still think this sort of thing (maybe cleaned up a bit) should
be put in the general distribution.
                                        PJD


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT