[ScryMUD] SVN Commit Info r826 - trunk/mud/grrmud/server
Ben Greear
greearb at candelatech.com
Fri Jan 7 19:33:29 PST 2005
scrymud at wanfear.com wrote:
> Author: eroper
> Date: 2005-01-07 19:22:41 -0800 (Fri, 07 Jan 2005)
> New Revision: 826
>
> Modified:
> trunk/mud/grrmud/server/command4.cc
> trunk/mud/grrmud/server/zone.cc
> Log:
> automapper will no longer mark all paths as "stretched".
>
> toggling obj_flag 54 (container) will now actually make the object a bag or
> unmake a bag and clear the objects inventory.
>
> This should prevent issues like the accidental purging of all objects from
> Koth (whistles an innocent tune), caused by corruption of the World/ database.
>
> Ben, if you read this can you let me know if obj_ptr->inv.clearAndDestroy() is
> safe, or do I need to walk and and call lose() on every object in the
> inventory? (see: command4.cc:3096
clearAndDestroy will delete everything pointed to by the list.
That is not the same as lose(), which only removes the pointer from the list.
There should already be logic similar to this in the 'get all' command logic.
It can get tricky because maybe someone is snooping through an object, or
otherwise has a reference to the object in the inventory...
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the ScryMUD
mailing list