Corpse bug 2005-07-18 - By Christopher Lengel
Back Hi all, I'm having a problem with this undertaker code.
It works pretty well for most, but occasionally it grabs a container from an order and places it into the undertakers room. It has only happened with one specific character and I have no idea why..
Here's what I get..
force aragon corpse retrieve Log: Christian: force aragon corpse retrieve Jeimdall the Undertaker creepily carts in the corpse of Aragon. Log: [*****] BUG: obj_from_room: NULL. Jeimdall the Undertaker creepily carts in the corpse of Aragon. Jeimdall the Undertaker creepily carts in the corpse of Aragon.
Here's the section of code...
for ( obj = first_object; obj; obj = obj->next ) { if (!nifty_is_name (buf, obj->short_descr)) /* Fix here - Samson 1-26-01 */ continue; /* This will prevent NPC corpses from being retreived if the person has a mob's name */ if (obj->item_type == ITEM_CORPSE_NPC) continue; found = TRUE; /* Could be carried by act_scavengers, or other idiots so ... */ outer_obj = obj; while (outer_obj->in_obj) outer_obj = outer_obj->in_obj; separate_obj (outer_obj); obj_from_room (outer_obj); obj_to_room (outer_obj, ch->in_room); ch->gold -= cost; act (AT_PLAIN,"$N creepily carts in your corpse.", ch, NULL, mob, TO_CHAR); act (AT_PLAIN,"$n creepily carts in the $T.", mob, NULL, buf, TO_ROOM); }
something must be wrong with outer_obj, but I'm really not experienced enough with smaug to track this down.
Any help would be greatly appreciated!
__ ____ ____ ____ ____ ____ ______ Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail
|
|